Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database, tables and the data enviroment
Message
From
07/11/1997 14:40:33
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00058924
Message ID:
00058969
Views:
28
>>>I am using VFP 3.0 for Windows.
>>>
>>>Here is a problem that I have been struggling with for a while...
>>>
>>>When I am creating a form or a report and use the data environment to access the tables needed, should I add the tables from my test environment or from my production environment?
>>>
>>>It seems that if I point to the test tables that the form wants to continue to access those tables even after I have promoted the exe into the live environment (really just a different directory on the file server).
>>>
>>>Can anyone tell me what I should be doing?
>>
>>To ensure that you always point to proper database/table, you should reset DE.CursorX.Database properties in all Form.DE.BeforeOpenTables events (it can be some generic method). Also, you application should have some app object property to store database path.
>
>Edward, Ken, Bret:
>
>Thanks for your help. I will implement one of them.
>
>This does seem like a real PITA though. It would be nice to be able to make a relative reference to the tables (ie: the tables are in a subdirectory of the current directory) rather than making an absolute reference (ie: P:\db\main\demo.dbf).
>
>There is no other way around this?
>
>Do most people not use the DE? I am trying to move away from opening all of my tables at the start as was the norm in FP 2.6 .

I believe most people use DE (and opened all tables at the start in 2.6). The good (but not absolute) rule to avoid absolute paths doing development is to develop on 'normalized' development tree, i.e. you have project file in root folder and all related files in subfolders.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform