Previous Thread

7/24/2006 8:07:03 AM    Handling raise errors thrown from sybase strored proc from C#
Hi, 
 
Am tring to get the raise error message and error number after executing the 
 
sp from c# code and namespace we are using System.Data.OleDb namespace. Even 
 
if the sp raises different error number but it gives error return code 0 
 
after exec the sp in the C# and when sp raise any error it goes to catch 
 
block when we try to execute this sp. Any idea of how to do that 
 
Thanks in Advance



7/24/2006 10:09:33 PM    Re: Handling raise errors thrown from sybase strored proc from C#
Neel (Neel@discussions.microsoft.com) writes: 
 
Have you looked at the OleDBErrorCollection? You should find error number 
 
and error text there. (But you cannot retrieve the severity.) 
 
Tip: this group is for using the native OLE DB interface. The expertise 
 
on ADO .Net is better in microsoft.public.dotnet.framework.adonet. 
 
-- 
 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se 
 
Books Online for SQL Server 2005 at 
 
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx 
 
Books Online for SQL Server 2000 at 
 
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx