[thelist] Calling a sproc from VB

Anthony Baratta anthony at baratta.com
Wed Feb 4 14:18:32 CST 2004


At 11:40 AM 2/4/2004, Tab Alleman wrote:

>Since the OUTPUT string variable returns empty, I figure it must be
>hitting a fatal error that causes the sproc to completely fail.

Normally when we have a failure of the SP, everything blows up. This is via 
ASP/.Net - not sure how VB itself works.

>If I did what you did:
>
>And a fatal error occurred, would I get to see what the error was?
>Obviously it wouldn't be in my OUTPUT parameter.  Where would it be?
>How can I get my VB app to spit it out?

Like I said previously I don't use output parameters. By returning the 
error info via the Select statement it works just like getting data/rowset 
from the database. In this case I'd be looking for the Identity Number 
assigned to the previous insert. And if that ID returned is 0, then I know 
an error was thrown.

Depending on how you have crafted your functions to collect the returned 
data just use those same routines to see if there was an error.

---
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."



More information about the thelist mailing list