Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the CursorSource in the DataEnvironment
Message
 
To
08/07/1998 12:24:55
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00115080
Message ID:
00115342
Views:
16
>How can I re-direct my path if I have 2 sets of datafiles? VFP always goes to
>the original path due to the use of dataenvironment wich stores the fullpath of
>the cursor. Even if I set my path to another directory, it works with the original
>cursors as long as they exist in the path the dataenvironment got when created.

>This is also a problem when the path indicates a mapped drive like
>\\Computer1\c\datadir. The app just doesn't work and says: "Index does not
>match".


I prefer to handle opening and closing datafiles with a file handling object, created from a custom class. That way I can always control what is opened and closed. If you are using the DE, you could change the cursorsource and database property of each cursor in the BeforeOpenTables of the DataEnvirnment to the desired path. Then the file you want should get opened. Fox will always look for the tables and database in the paths in the DE before looking along your SET PATH.
Previous
Reply
Map
View

Click here to load this message in the networking platform