Page 1 of 1

Best technique to handle Database exception

Posted: Mon 28 Jun 2010 00:16
by sbokhari
Hi,

I am looking for best technique to handle database exception in the entire application.
I am using multiple database server such has FireBird and MySQL in one application.

I have looked at EUniError, EIBCError and EMySqlException.

Please tell me
1. How and where (in code) to implement database exception handling technique. So that my entire application uses standard way to handle DB exceptions?

2. Which exception class should I used? EUniError (for both FB and MySQL), EIBCError for FB and EMySqlException for MySQL individually .

Thanks in advance.

S. Bokhari

Posted: Tue 29 Jun 2010 14:00
by Dimon
You can process exceptions after every operation or handling the Application.OnException event.
UniDAC converts EIBCError and EMySqlException to the EUniError exception. You can use the EUniError.InnerError property to get inner exception.