A
Andy Fish
Hi,
I have done a bit of programming against the System.Data.SqlClient classes
but in order to maintain some prospect of database portability in my code I
would prefer to use the more general IDbConnection, IDbCommand etc.
However, I notice there is no corresponding IDbException, and the
documentation for the IDbXXX interfaces does not mention any exceptions that
might be thrown.
Am I correct in thinking that using the more general IDbXXX interfaces is a
good practice? - it seems silly to tie myself unnecessarily to one database
provider implementation? If so, how should I manage database exceptions?
Thanks in advance for any responses. Even if there is no nice answer, it
would be good to know that I'm not overlooking something obvious
Andy
I have done a bit of programming against the System.Data.SqlClient classes
but in order to maintain some prospect of database portability in my code I
would prefer to use the more general IDbConnection, IDbCommand etc.
However, I notice there is no corresponding IDbException, and the
documentation for the IDbXXX interfaces does not mention any exceptions that
might be thrown.
Am I correct in thinking that using the more general IDbXXX interfaces is a
good practice? - it seems silly to tie myself unnecessarily to one database
provider implementation? If so, how should I manage database exceptions?
Thanks in advance for any responses. Even if there is no nice answer, it
would be good to know that I'm not overlooking something obvious
Andy