Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call a stored proc from a class object event met
Message
 
À
21/07/1998 00:43:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00119503
Message ID:
00119801
Vues:
14
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform