>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement