Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Resetting path to database in form dataenvironment
Arg... I have been struggling with this one for a few days in VFP3. I am trying to reset the path to the database for each cursor in a form's dataenvironment. At design time the cursors point to the test database. In the BeforeOpenTables method I tried the following code
this.cursor1.database = gcAppPath+"\database\library.dbc"
this.cursor2.database = gcAppPath+"\database\library.dbc"
this.cursor3.database = gcAppPath+"\database\library.dbc"
this.cursor4.database = gcAppPath+"\database\library.dbc"
I get the following error "Error Loading form or the data environment - record number 9. File access is denied".
Sometimes I will also get "Table 'foo.dbf' is not marked as belonging to the database. Would you like to create the back link to mark it?"
Is this how other people reset the path to the database? Am I getting the error because the form is corrupt? Record 9 of the SCX table is the record that holds the form class.
gcAppPath is a global variable and correctly gets the path using sys(2003)
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