Groups | Blog | Home
all groups > sql server programming > february 2006 >

sql server programming : Passing variables etc to a custom error message


KBuser
2/13/2006 1:04:27 PM
MessageBox.Show("Exception Occured -->> " + errormessagestringhere, "An
error occured during connection attempt:");
KBuser
2/13/2006 1:05:25 PM
I'm sorry, I thought I was looking in a C# group...
Alan Brewer [MSFT]
2/13/2006 1:20:26 PM
Do you mean a custom error you raise from Transact-SQL code using RAISERROR?
If so, you can use printf() style substitution. Doing that is discussed
(with a code sample) in this topic from the SQL Server 2005 Books Online:

http://msdn2.microsoft.com/en-us/library/ms177497(SQL.90).aspx

--
Alan Brewer [MSFT]
Content Architect, SQL Server Documentation Team

SQL Server Developer Center: http://msdn.microsoft.com/sql
SQL Server TechCenter: http://technet.microsoft.com/sql/

This posting is provided "AS IS" with no warranties, and confers no rights.

Robert Bravery
2/13/2006 11:03:45 PM
Hi all,

I'm trying to pass some variables a custome error message I have created.
But I'm not getting it write. How do I put place holder for the variable in
the custom error message, and how do I pass it values.

Thanks
Robert

Robert Bravery
2/13/2006 11:16:01 PM
I though that was strange

Robert

[quoted text, click to view]

Robert Bravery
2/14/2006 12:00:00 AM
Thanks Alan,

That helps. I looked but did not see or could'nt find it. But found it
online in the url you supplied

Thanks

Robert

[quoted text, click to view]

AddThis Social Bookmark Button