>#DEFINE CRLF chr(13)+chr(10)
>=SQLEXEC(nConnectHandle, ;
> 'DECLARE @ret int' + CRLF + ;
> 'EXEC @ret = MySQLSvrStoredProc' + CRLF + ;
> 'select @ret as nResult','ResultAlias')
>
>You can then retrieve the return value from the cursor returned. Vlad Grynchyshyn supplied me with this code methodology and I use it quite oftern to get the return value which usually holds any error parameter in my SP's.
>
>Bill
Thanks, that's clever. I will have to put it in my bag of tricks.
What we do now is use RaisError in the SP with a severity higher than 11 and then SQLExec returns a -1 and we can use aerror to get the error info.
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