Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Database and private datasessions
I must be missing something simple here. I have a project that needs to run all private datasessions. No problem there. The problem is how the database gets opened.
I have a method .SetEnvironment() in the form template that is called in the .BeforeOpenTables() method of forms to show. I can open the database via OPEN DATABASE myDB and things are just fine. But I also have a DB class which handles all that stuff and although the form recognizes the object and runs the .OpenDatabase() method, the database is not opened by doing so.
*
* This works when MyDB is hardcoded in.
*
OPEN DATABASE MyDB
*
* This doesn't work although goDB is recognized as an object but none * of the database commands function. Db name is a property within.
*
goDB.OpenDatabase()
What am I missing here or am I stuck with hardcoding the database name? I haven't tried instantiating goDB with each form as that seems to be a waste.
Steve
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