Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record Lock
Message
De
04/03/2003 10:38:24
 
 
À
04/03/2003 10:22:41
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00760359
Message ID:
00760906
Vues:
25
>Thanks Bob, I had just figured it out right before I read your response. I do have one question, do you have to return the output parameter or is it returned no matter what? And also, If the stored procedure would happen to

An OUTPUT parameter and a return value are two seperate things. Generally getting values back from an SP you use an Output parameter reserving the RETURN value for error handling. I have to admit, since in VFP you can't get access to the return value without using ADO, I never use it.

So, in your SP, you can take the @ReturnValue off of the return line.

> fail, what would occur, is there a set return value or something? I have a

SQL Server will raise an error, which I assume will cause the .Net SqlClient to throw an exception. Also, just to be on the safe side you can change your SP to

RETURN @@ERROR

You can check this in ADO.Net... once again, I am a novice at that so I can't give you the exact code, but if the return value is not zero you had an error.

But, as I said, I think the SQL error will be thrown as an exception so you can wrap your code in a Try Catch block and try to catch a sql exception, or whatever it is called.

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform