Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Production and Development Environments
Message
 
To
24/04/1999 19:56:34
Susan Giddings
Aar Engine Component Services
Windsor, Connecticut, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00211944
Message ID:
00211946
Views:
39
>Is it possible to set the data environment in a form (or report) so that if it is run in production, it accesses the dbc on production server but if it is run in development, it access the dbc on development box?
>
>In this particular case, dbc and all dbf names are identical. The only difference is the path to the dbc. I have tried to do this, but for some reason the data environment remembers that it got itself from development path and I can't seem to be able to re-direct it. I'm probably not doing something really simple right, but it has me stumped!
>
>Appreciate any help. - Susan

Susan,

There is a chapter in the Effective Techniques book that builds a from class that can do what you want.

Basically, what you need to do is in the form's Load make sure that the tables are closed by calling the ThisForm.DataEnvironment.CloseTables(). Then you can get a list of the DE's members with AMEMBERS(). You then loop through the members and for the Cursor baseclass you set the Database property to point where you want. Finally, you call the DE's OpenTables() method.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform