Information générale
Titre:
Private datasessions and current database
I typically create forms with private datasessions that access local views. Apparently I have 2 options:
1. Add all of the view's base tables to the data environment, then add the view itself to the data environment, or
2. I can add just the view to the data environment if I SET DATABASE TO MyDatabase in the BeforeOpenTables event.
If I don't add all base tables to the data environment before adding the view itself, or if I add just the view but don't SET DATABASE TO MyDatabase, I get the Open dialog box asking me to locate the tables.
It appears that even though the database is open when the form is instantiated, it is not selected as the current database in a private datasession unless a SET DATABASE TO MyDatabase is executed. I would prefer to add just the view to the data environment but not have to enter the SET DATABASE command in the BeforeOpenTables event of each form that I create. Is there some OOP solution to this?
TIA,
Gary
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement