View Single Post
  #5 (permalink)  
Old March 1st, 2007, 08:00 AM
happygv happygv is offline
Friend of Wrox
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post

Yes rob, error handling using @@ERROR is the standard method followed in stored procedure. Client development tool is completely ruled out in this case. As my intention is to capture it from the sql server, say with a stored procedure, and get the exact error that the sql server throws in usch cases. @@ERROR results in INT value which can be used to decide if it is success or failure. I wanted to go a level above and capture the error that sql server returns from the sysmessages table using xp_printf and stuff with the % and *ls etc... replaced as shown below
Incorrect syntax near '%.*ls'.
Hope that explains.

Yes Joe, It is tough in sql server 2000, the sad thing is I wanted to accomplish this in 2000, not in 2005.

Thanks for your replies.

- Vijay G
Strive for Perfection
Reply With Quote