Subject | how to know when an exception is du to SQL syntax or other |
---|---|
Author | svanderclock |
Post date | 2009-07-03T08:40:40Z |
hello,
i want to know when we execute some SQL and we receive an error if the error is because
SQL QUERY RELATED
1/ SQL syntax
2/ foreign key or primary key violation
DATABASE RELATED
1/ client was disconnected from the database
2/ server shutdown
3/ network error
3/ etc...
this to know when i must release the database connection or when i simply need to rollback the query
thanks by advance for you help
stephane
--
http://www.arkadia.com/fra/
http://www.arkadia.com/rus/
http://www.arkadia.com/usa/
i want to know when we execute some SQL and we receive an error if the error is because
SQL QUERY RELATED
1/ SQL syntax
2/ foreign key or primary key violation
DATABASE RELATED
1/ client was disconnected from the database
2/ server shutdown
3/ network error
3/ etc...
this to know when i must release the database connection or when i simply need to rollback the query
thanks by advance for you help
stephane
--
http://www.arkadia.com/fra/
http://www.arkadia.com/rus/
http://www.arkadia.com/usa/