Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FAQ re: setting database path at run-time...another way?
Message
 
 
To
02/09/1999 21:07:30
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00260939
Message ID:
00260949
Views:
14
Also make sure you put the code into the load event not the init event of the form.

>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform