TIBCSricpt and exeptions

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dehorter
Posts: 45
Joined: Fri 16 Oct 2009 13:53

TIBCSricpt and exeptions

Post by dehorter » Fri 20 Aug 2010 11:51

Hi

i update client database using a script. Everything perfect :D , but i observed a curious behavior when an error occurs into the script.

i include the execute statement into an exception :

Code: Select all

TRY
     Chaine := fData.GestBag_Script.Statements[k].SQL;
     fData.GestBag_Script.Statements[k].Execute;
EXCEPT
     IF Log THEN fDivers.Logger.Add('Donnee -D30- : ' + chaine + 
           fData.GestBag_Script.Statements[k].SQL); 
END;  // Fin de EXCEPT
in order to track these errors. however when an error occurs (and so an exception), the process avoid the exception block that seems to be curious !

is it normal ?

regards
olivier

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 25 Aug 2010 09:45

If an exception occurs in the try block, the except block can be processed.
Try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

Post Reply