Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Production and Development Environments
Message
 
À
24/04/1999 19:56:34
Susan Giddings
Aar Engine Component Services
Windsor, Connecticut, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00211944
Message ID:
00211946
Vues:
37
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform