Click to See Complete Forum and Search --> : RISEERROR and ADO


Gregory64
December 11th, 2003, 11:17 AM
Hi,
I have application that connects to MS SQL 2000 using ADO. I’m trying to handle multiple errors returned from store procedures. Everything works OK if I do not have cursor inside my store procedure. Once cursor is reached ADO driver fly out and I do not get rest of the error or record set. Just to be clearer here is the example of what happens:

In case of code like this:
RAISERROR 1
--other code
RAISERROR 2
-- other code
RAISERROR 3
Select statement

In my app I m able to get all 3 errors and record set

In case:
RAISERROR 1
--other code
RAISERROR 2
Open cursor
RAISERROR 3
Select statement

I’m getting only error 1 and 2 but not error 3 or record set after cursor.

Any suggestions are really appreciated

buser
December 18th, 2003, 01:13 AM
???
SET NOCOUNT ON

buser
December 18th, 2003, 01:16 AM
RAISERROR ( { msg_id | msg_str } { , severity , state }
[ , argument [ ,...n ] ] )
[ WITH option [ ,...n ] ]

Severity Level 10: Status Information

This is an informational message that indicates a problem caused by mistakes in the information the user has entered. Severity
level 0 is not visible in SQL Server.