I'm using Delphi7/Firebird 2.1/Windows XP/IBDAC 2.50.0.37
Create a new project in Delphi 7. Drop an IBCConnection on the form, and give the parameters of a test database and set connected to true (so the program autoconnects on startup).
Put an IBCAlert component on the form. Use the following code:
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IBCAlerter, DB, DBAccess, IBC;
type
TForm1 = class(TForm)
IBCConnection1: TIBCConnection;
IBCAlerter1: TIBCAlerter;
procedure FormShow(Sender: TObject);
procedure IBCConnection1Error(Sender: TObject; E: EDAError;
var Fail: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
var
I: Integer;
begin
for I:=0 to 31 do
IBCAlerter1.Events.Add('Event' + IntToStr(I));
IBCAlerter1.Start;
end;
procedure TForm1.IBCConnection1Error(Sender: TObject; E: EDAError;
var Fail: Boolean);
begin
Fail:=false;
ShowMessage('Error occured!');
end;
end.Launch the application in debug mode.
Now, once the application is running, stop the Firebird server. Here is what happens for me (error messages in order):
Please note that if I launch the application outside Delphi (without debug mode) the application terminates abnormally by Windows saying that the application had to be closed due to an error.---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EIBCError with message '
unknown ISC error 0'. Process stopped. Use Step or Run to continue.
---------------------------
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EIBCError with message '
unknown ISC error 0'. Process stopped. Use Step or Run to continue.
---------------------------
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EIBCError with message '
unknown ISC error 0'. Process stopped. Use Step or Run to continue.
---------------------------
---------------------------
Project1
---------------------------
Error occured!
---------------------------
---------------------------
Application Error
---------------------------
Exception EAbort in module Project1.exe at 000CA744.
Operation aborted.
---------------------------
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EIBCError with message '
Error writing data to the connection.'. Process stopped. Use Step or Run to continue.
---------------------------
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EIBCError with message '
Error writing data to the connection.'. Process stopped. Use Step or Run to continue.
---------------------------
---------------------------
Project1
---------------------------
Error occured!
---------------------------
---------------------------
Application Error
---------------------------
Exception EAbort in module Project1.exe at 000CA744.
Operation aborted.
---------------------------
At this point, the application terminates.
Please also note that the error occurs if there are many events registered for the IBCAlerter component. If you register 5 events for example, there is no such error. If you register more events, the "Unknown ISC error 0" message appears twice, and for this many events it appears trice!
Please investigate this error and fix it in next IBDAC release.
Thank you!