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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How do I get error message from EXEC SP_EXECUTESQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-12-14 : 07:43:13
Marius Roets writes "I can query the @@ERROR to find out if the statement EXEC SP_EXECUTESQL was successful, but I need to know what was the exact error message from the EXEC SP_EXECUTESQL SQL statement.

I need the exact error message to report back to client what the problem was from the SQL statement that EXEC SP_EXECUTESQL execute."

Kristen
Test

22859 Posts

Posted - 2005-12-14 : 07:48:44
Hi Marius Roets, Welcome to SQL Team!

It will be in the ADO "Errors" collection, won't it?

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-14 : 07:57:34
Or
http://www.sommarskog.se/error-handling-I.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-12-14 : 10:07:46
hello Marius Roets,
apart from error handling, if you do want to know the status of the sp execution, use the return function to return a value to your calling appliation

hope this helps

Afrika
Go to Top of Page
   

- Advertisement -