Question: Can you help me with a coding example showing how to program the handle of the database errors. Until now I always used "on E: EFIBError do ..." and do not know how I can program this in FIBPlus.

Answer: You can use both - standard exceptions (EDatabaseError) and specific FIBPlus exceptions. For example:

try
 something
except
 on E: EFIBError do ...
end

FIBPlus exceptions are described in fib.pas:

EFIBError = class(EDatabaseError)
private
  FSQLCode: Long;
  FIBErrorCode: Long;
  FSQLMessage :string;
  FIBMessage :string;
  SenderObj :TObject;
  public
    constructor Create(ASQLCode: Long; const aMsg: String;Sender:TObject);
    constructor CreateEx(ASQLCode: Long; const IBMsg,SQLMsg: String;Sender:TObject);
    property SQLCode : Long read FSQLCode ;
    property IBErrorCode: Long read FIBErrorCode ;
    property SQLMessage :string read FSQLMessage;
    property IBMessage :string read FIBMessage;
end;
EFIBInterBaseError = class(EFIBError);
EFIBClientError = class(EFIBError);

For more details about this please read an article "FIBPlus: handling database errors"  

Preview text: 
Prices in Euro:

235 (1 copy)
1250 (unlimited)

Volume discounts are available...

Navigation



What a good job you did! Keep coding great pieces of fast and efficient software:) We started using FIBPlus back in 2001. Since then, every project we offer uses FIBPlus to connect to FirebirdSQL. You library has always been stable, flexible and rocket fast ! Our major project, an helpdesk/data mining application, concurrently used daily by more that a hundred technicians and analysts, uses FIBPlus. Now that FirebirdSQL 2.0 is available, we have been able to upgrade our application quickly and painlessly - that's another reason you can be proud of your work ! >>

Benoit Le Bourhis, Adhoc Innovations
FOR CUSTOMERS
Download full versions and updates in your Personal Area