Subject Database Error Exception Handling In IBO
Author Çağatay TENGİZ
Hi to all,

I'm trying to give a custom error message when user violates primary or unique key constraints for this I'm using TIB_Query's OnError even as follows :

procedure TfmKitap.vthata(Sender: TObject; const ERRCODE: Integer;
ErrorMessage, ErrorCodes: TStringList; const SQLCODE: Integer;
SQLMessage, SQL: TStringList; var RaiseException: Boolean);
var msgstr : string;
if ERRCode = 335544665 then begin
MsgStr := 'Hatal� kay�t giri�i !'+#13#10+'Bu kay�t daha �nce girilmi�!';
messagedlg(msgStr, mtError, [mbOk], 0);
RaiseException := False;

But when I set RaiseException to false, after displaying my own error message I get E_Record_Not_Located_For_Update (Record was not located for update) error if updating current record, or E_Record_Not_Inserted (Record was not inserted) error if inserting new record from IBO

How can I solve this?

Best Regard

M. �a�atay Tengiz

Tengiz M�hendislik & Dan��manl�k
Kaz�m Karabekir Cad. No:47/B Bornova - �zmir
Tel : 0 232 388 07 01

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