will a client application using ado.net get an exception if the command is executing a stored proced

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

will a client application using ado.net get an exception if the command is
executing a stored procedure that does a RAISEERROR in its tsql?
 
Daniel,

Well, you could try it very easily (and probably have it done in the
time it took for you to get this response).

But the answer is yes. =) It should throw a SqlException.

Hope this helps.
 
Actually, a little more thorough answer. Yes. The client will get a
SqlException with SqlException.Number set to 50000 by default or whatever you
set your error number to in your call to RAISERROR.
 
Very interesting article. I wasn't familiar with the infomessage event
before. I'll have to look for an opportunity to try it out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top