Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resetting path to database in form dataenvironment
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Resetting path to database in form dataenvironment
Miscellaneous
Thread ID:
00171382
Message ID:
00171382
Views:
59
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)
Next
Reply
Map
View

Click here to load this message in the networking platform