Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resetting path to database in form dataenvironment
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Resetting path to database in form dataenvironment
Divers
Thread ID:
00171382
Message ID:
00171382
Vues:
60
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
Fil
Voir

Click here to load this message in the networking platform