UNIDAC ERROR HANDLING
Posted: Sat 15 Jun 2013 15:05
Dear DEVART support,
Can you please provide example on how to catch unidac errors like in my example below? It seems that my code below is not correctly catching the error when I put a wrong db password. Delphi XE4 still prompts the error message dialog screen when it hits the error.
try
UniConnection1.ProviderName := 'SQLite';
// the name of the database to be encrypted
UniConnection1.Database := FileName;
UniConnection1.SpecificOptions.Values['Direct'] := 'True';
UniConnection1.SpecificOptions.Values['EncryptionAlgorithm'] := 'leAES256';
UniConnection1.SpecificOptions.Values['EncryptionKey'] := Password;
UniConnection1.Open; // connect to the database
except
on EUniError do
ErrorRoutine;
end;
Thank you very much for your support!
Can you please provide example on how to catch unidac errors like in my example below? It seems that my code below is not correctly catching the error when I put a wrong db password. Delphi XE4 still prompts the error message dialog screen when it hits the error.
try
UniConnection1.ProviderName := 'SQLite';
// the name of the database to be encrypted
UniConnection1.Database := FileName;
UniConnection1.SpecificOptions.Values['Direct'] := 'True';
UniConnection1.SpecificOptions.Values['EncryptionAlgorithm'] := 'leAES256';
UniConnection1.SpecificOptions.Values['EncryptionKey'] := Password;
UniConnection1.Open; // connect to the database
except
on EUniError do
ErrorRoutine;
end;
Thank you very much for your support!