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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-01-12 : 08:31:48
|
| itika vyas writes "When an error is genetated in the transaction statement @@error gives us the error number but if we want to catch the error description corresponding to that error no(that is stored in the sysmessages table)in an error log table what one should do?With raiseerror we can only log custom error messages but how can we log system error messages?" |
|
|
clarkbaker1964
Constraint Violating Yak Guru
428 Posts |
Posted - 2005-01-12 : 13:03:06
|
Good Question... From the front end of a VB project it is stored in the err object in .NET you can initialize the SQL class that contains the Sql Server errors and it would be in that error object.Are you asking from internal Sql Server say within the trigger? |
 |
|
|
clarkbaker1964
Constraint Violating Yak Guru
428 Posts |
Posted - 2005-01-12 : 13:05:18
|
Oh Many Front end developers create an error object table containing all of the error codes and then do a lookup based on the error number. This approach may also work, I never really liked the approach as the error numbers evolve with versions of the language. Hmmm |
 |
|
|
|
|
|