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 can I receive the Error Message text in my stored procedure?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-14 : 19:10:20
Chris writes "I have a query system where the user is allows to build a query up, we then execute this query using ADO.

If the ADO fails I have noticed that it often does not include an error description just the error code.

But in query analyzer I get the message for the error if I paste in the SQL code.

Say for example I get error 296, the message from master..sysmessages is

"The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value."

But other messages in that table have %s and %d and %S_MSG as part of the errormessage so I would like to get the real formatted message back from SQL server.

I thought I could then issue the bad SQL statement dynamically in a stored proceudure and return the message back to my ASP app."
   

- Advertisement -