Home All Groups Group Topic Archive Search About

dbexception, sqlexception and sqlstate

Author
5 Dec 2006 9:27 AM
bfbfbfbfb
hi all,
there is a way to get the ansi standard code sqlstate from class dbexception ?
if I downcast the exception, after the GetType(), to odbcexception I can
find it in the errors collection but if my dbexception is of type
SqlClient.SqlException i cannot find it.

In my code I make a very large use of this standard code (for no data,
dupkeys....) and if I cannot find it is very difficult to me to migrate to
ado.Net and the native sqlclient class.

thanks

AddThis Social Bookmark Button