Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 SQLException only returning the first error

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-10-10 : 07:34:08
Ted Osberg writes "I am using the SQLDataAdapter Command objects to perform
the stored procedure calls to the Insert, Update, and Delete stored
procedures to apply the updates that have been made to a DataSet. If
inside the stored procedure there is more than one Raiserror, only the
first error is returned in the errors collection of the SQLException.
Also if Raiserror is used to return a custom error after a database
error has occurred, only the database error is returned. It appears
that only the first error is returned no matter whether the error was
a custom error or on generated by SQL Server.

How can I get all the errors returned?"

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2005-10-10 : 14:20:04
Capture the call using sql profiler and paste the command into a query analyzer window and execute the code. See how many errors are raised that way. Depending on the severity level of the error, the code may stop executing right at the error and never continue on to the other errors. Post one of the procedures that you are having problems with if you want more help.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -