Hi all,
 
I have to get error code for database exception (.NET) using DbException class. 
Apparently, there is no way to extract error code directly using DbException 
class. 
 
When I get foreign key constraint, the message would be this: 
 
"violation of FOREIGN KEY constraint "FK_CLASSBUSINESS_1" on table 
"CLASSBUSINESS"
No message for error code 335544839 found.
At procedure 'SPDELETEDEPARTMENT'"
 
So I can get error code (335544839) by parse it from error message.
 
But, when I get primary key constraint, the message would be this (there is no 
error code):
 
"violation of PRIMARY or UNIQUE KEY constraint "DEPARTMENT_PK" on table 
"DEPARTMENT"
At procedure 'SPINSERTDEPARTMENT'"
 
How can I get the error code through DbException class? (Note: I don't use 
FbException class)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to