Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dataenvironment cursor paths
Message
From
25/10/2001 10:37:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/10/2001 10:14:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00573171
Message ID:
00573188
Views:
25
>Is there a way to easily change the absolute Database and/or CursorSource path(s) to a relative path at runtime (say, in the form's LoadEvent method) without having to manually write a line of code for each cursor in the dataenvironment?
>
>Thanks!
>
>Adam Nettles
lcNewDbc = getfile('DBC')
WITH thisform.dataenvironment
  .closetables
  lnMembers=amembers(arrObj,thisform.dataenvironment,1)
  FOR ix=1 to lnMembers
    IF Upper(arrObj[ix,2])='OBJECT'
      WITH eval('.'+arrObj[ix,1])
        IF upper(.baseclass) = 'CURSOR' and atc('dbc',.Database)>0
          .database = lcNewDbc
        ENDIF
      ENDWITH
    ENDIF
  ENDFOR
  .opentables
ENDWITH
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform