Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open tables in the DE
Message
 
 
To
09/04/2000 11:47:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00357355
Message ID:
00357375
Views:
24
>Usually, by the time my app has gotten to a form, the PATH issues have been addressed. I'm not a big fan of setting paths in more than one location for a single application.
>
>>From your post, I am assuming you have AutoOpenTables set to .F.. You could set it to .T., and set the path in the BeforeOpenTables method and then let VFP open the tables normally. This way VFP will handle all the table opens, index sets and relation creation defined in the DataEnvironment.
>>
>>Just a thought.

Neither am I but the above technique works when there are ambiguous paths.

For example, in my last project we had a peer to peer NT Workstation setup. One of the machines was the primary database server and one was a backup in case of emergencies. The directory structure was the same on both servers.

Program
|___
Data

In the initial application setup, a path statement was set to the DATA directory of the primary server. Everything worked fine except for the backup server. VFP stores the Database name in the Dataenvironment with a relative path. On the backup server, VFP opened all the tables from the DBC contained in its own (backup) DATA directory. VFP didn't check the PATH if it found it locally. There were two solutions that I found. Adopt the technique described above, or open all the tables, views and relations programmatically in the Load event and bypass the Dataenvironment altogether. The above technique is faster and less code to maintain.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform