Can't you ignore the error? I am not into the .NET coding thing yet (though
Yukon will get me there soon enough) but I would suppose you would do
something along the lines of ON ERROR RESUME. Check the error, see if it
is one that you don't care about, and then RESUME. I think TRY CATCH can do
this, right?
--
----------------------------------------------------------------------------
-----------
Louis Davidson (***@hotmail.com)
Compass Technology Management
Pro SQL Server 2000 Database Design
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are
interested in consulting services. All other replies will be ignored :)
Post by BuddyWorkI'll explain the issue,
We are converting code to C# from a language called AM, AM
uses DB-Library to talk to SQL Server, DB-Library would
ignore severity checking return any results after the
error, ADO.Net throws a SQL Exception when an error of
severity of 11 or above is raise, so for us to get the
code to work we have to change all our RAISERROR's to use
serverity of 10 so ADO.Net does not throw a SQLException.
When it throws the SQLException there is no way to
retrieve the data.
Example,
RAISERROR "No Clients within this branch",16,1
BEGIN
SELECT * FROM Employee
END
We basically do not get the results back when a system
generated error is raised with the error code less than
50000.
-----Original Message-----
This is a bad bad bad idea. Why do you need to change
the Severity? What
is the severity causing you?
--
----------------------------------------------------------
------------------
-----------
Compass Technology Management
Pro SQL Server 2000 Database Design
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are
interested in consulting services. All other replies
will be ignored :)
Post by Anthony FaullEXEC sp_configure 'allow updates', '1'
RECONFIGURE WITH OVERRIDE
GO
UPDATE master.dbo.[sysmessages]
SET severity = 16
WHERE error = 266
AND severity = 10
EXEC sp_configure 'allow updates', '0'
RECONFIGURE WITH OVERRIDE
Post by BuddyWorkHello,
Can someone please give me an example of how I can
change
Post by Anthony FaullPost by BuddyWorkthe severity of 16 to severity of 10 for Err 266.
Thanks
.