Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the CursorSource in the DataEnvironment
Message
 
À
08/07/1998 12:24:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00115080
Message ID:
00115342
Vues:
17
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform