Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FAQ re: setting database path at run-time...another way?
Message
From
02/09/1999 21:07:30
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
FAQ re: setting database path at run-time...another way?
Miscellaneous
Thread ID:
00260939
Message ID:
00260939
Views:
49
The FAQ entitled: 'How do I ensure my forms are pointing to the correct tables' dated 24/06/99 provides a means for modifying the path of a database that is declared in the DE. Works great!

But..I recently tried to use one of MS's canned forms (the simple one you get when use the form wizard) and the form broke when I tried to modify the database path in the manner cited above.

It broke because the init of one of the form's controls (the pushbuttons) tries to access a cursor ... which hasn't been created yet since, as per the cited ref, files are not opened until the form's init fires.

(...thus illustrating, among other things, the pitfalls of mucking with precanned classes...)

I discovered that I could mitigate this problem by allowing the DE to automatically open the files, and instead, modify the database path of the cursor in the DE's beforeopentables event.

Is this another acceptable means for achieving the same result as in the cited FAQ?
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Next
Reply
Map
View

Click here to load this message in the networking platform