Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass a variable from the .DBC stored procedures ?
Message
De
24/08/1999 07:28:23
Bruce Covey
Home Depot Television
Atlanta, Georgie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Pass a variable from the .DBC stored procedures ?
Divers
Thread ID:
00256965
Message ID:
00256965
Vues:
44
After getting a "light bulb" turned on from an answer yesterday, I have run into one unexpected snag.
I have a simple error handler procedure in my main.prg. In the .DBC stored procedures, I wrap an RI generated delete trigger function within my own UDF() in which I generate an error message that I want my error handler to use. I thought I could declare a PUBLIC variable in the main.prg and then have my UDF() feed it a text string. Is it possible for code in the .DBC stored procedures to toggle variables in the application ? If not, how might I pass a text string to the error handler while in the midst of an error condition ?
Here is the code in the .DBC:

FUNCTION delete_projects() &&Projects table DELETE trigger
lRetError = __ri_delete_projects() &&RI generated
IF lRetError = .F.
cRsrcError = "This Project cannot be deleted" &&Public var main.prg
Return .F. &&This will trigger the VFP error that I will catch
ELSE
RETURN .T.
ENDIF

As always, any help is greatly appreciated.
Répondre
Fil
Voir

Click here to load this message in the networking platform