From d36b1e2b0a429f16141d666ec93060ede19104c9 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 26 Dec 2011 22:45:57 +0000 Subject: [PATCH] Follow up to previous commit: Catch more exceptions when creating the ADO handle. Most probably there are more I know of. --- source/dbconnection.pas | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index ed94a4c9..5614e8dc 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -1000,14 +1000,10 @@ begin // Creating the ADO object throws exceptions if MDAC is missing, especially on Wine FAdoHandle := TAdoConnection.Create(Owner); except - on E:Exception do begin - if Pos('Data Access Components', E.Message) > 0 then - raise EDatabaseError.Create(E.Message+CRLF+CRLF+ - 'On Wine, you can try to install these:'+CRLF+ - 'sh winetricks mdac28') - else - raise; - end; + on E:Exception do + raise EDatabaseError.Create(E.Message+CRLF+CRLF+ + 'On Wine, you can try to install MDAC:'+CRLF+ + 'sh winetricks mdac28'); end; NetLib := ''; case Parameters.NetType of