Subject RE: [IBO] "Record was not located to Update" - handling in TIBODataset
Author Dmitry A. Beloshistov
Hmm. I`m write simple application – IBODatabase,IBOTransaction,IBOQuery and 2 buttons – all work fine… IBODatabase error fired if I`m put wrong login/password, IBOQuery – if I`m try execute wrong SQL statement. IBOQuery and IBODatabase can has same error handlers (check sender if need). You can show simple code?

Source below:
~~~~~~~~~~~~~~~~~~~~~~~~~~~

procedure TForm1.Button1Click(Sender: TObject);
begin
IBODatabase1.Connect;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
IBOQuery1.SQL.Text:='SELECT * FROM NOTEXISTSTABLE';
IBOTransaction1.StartTransaction;
IBOQuery1.Open;
end;

procedure TForm1.IBODatabase1Error(Sender: TObject; const ERRCODE: Integer;
ErrorMessage, ErrorCodes: TStringList; const SQLCODE: Integer; SQLMessage,
SQL: TStringList; var RaiseException: Boolean);
begin
ShowMessage('DB - OnError:'#13+ErrorMessage.Text);
raiseException:=True;
end;

procedure TForm1.IBOQuery1Error(Sender: TObject; const ERRCODE: Integer;
ErrorMessage, ErrorCodes: TStringList; const SQLCODE: Integer; SQLMessage,
SQL: TStringList; var RaiseException: Boolean);
begin
ShowMessage('DB - OnError:'#13+ErrorMessage.Text);
raiseException:=True;
end;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

WBR, Dmitry Beloshistov AKA [-=BDS=-]

From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Thursday, August 07, 2014 4:51 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] "Record was not located to Update" - handling in TIBODataset



No, OnError isn't triggered, nor are any of the other error events.
I've sent Jason some example code, hopefully his analysis will suggest a solution.



[Non-text portions of this message have been removed]