Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call a stored proc from a class object event met
Message
 
To
21/07/1998 00:43:08
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00119503
Message ID:
00119801
Views:
15
>Well, the code is in a form which has data environment setup. And one of the field on the form is bound to a table field. Even after that, do I have to add the "set database to..." statement?
>
>Thanks
Puri,

Yes, having the databaser open does not insure that it is the currently selected database. You need to set database to make sure it is selected. The safe way is to;
LOCAL lcOldDBC
lcOldDBC = DBC() & save the current dbc
SET DATABASE TO TheOneYouWant
* Do your thing


* and then ...
IF NOT EMPTY(lcOldDBc)
   SET DATABASE TO (lcOldDbc)
ELSE
   SET DATABASE TO
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform