Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedure
Message
De
26/09/2002 05:07:52
Kumar Anturekar
Tandon Information Solutions Pvt. Ltd.
Mumbai, Inde
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Stored Procedure
Divers
Thread ID:
00704587
Message ID:
00704587
Vues:
57
Hi,

I am excuting a stored procedure of SQL2000 from VFP using SQLEXEC().

This Stored Procedure (lets say usp_1) In turn calls another Stored (lets say usp_2)Procedure to Insert Records into the different Tables in a Database.

sErrorStr = ""
=SQLEXEC(nHandle,"EXEC usp_1 ?sErrorStr")

Now usp_2 is passing a prameter (OUTPUT) to usp_1, which is the error number generated (if at all) by the insert statements (or 0 if none). I have used the @@ERROR immediately after every insert statements.
usp_1 accepts this parameter passed by usp_2 and based on some logic passes the necessary output ( which is a string ) to VFP's output parameter

What is happening is whenever there is a error in the usp_2 at the time of insert the whole procedure is terminated and the output of SQLEXEC() is -1.

What i want is that it should return the error code to usp_1, which will then pass the necessary output to VFP's output parameter (sErrorStr).

Please help...

Kind Regards,
KUMAR.
Kind Regards,
KUMAR ANTUREKAR.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform