Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Using OnCommitError
Sat, Sep 7 2013 10:44 PMPermanent Link

David Martin

How does one fill in the Database OnCommitError event handler? (I've always done such things using the Object Inspector, but Database is non-visual and I don't see it in the Object Inspector.) Thanks for any help.

DM
Sat, Sep 7 2013 11:33 PMPermanent Link

Raul

Team Elevate Team Elevate

>David Martin wrote:
>How does one fill in the Database OnCommitError event handler? (I've always done such things using the Object >Inspector, but Database is non-visual and I don't see it in the Object Inspector.) Thanks for any help.

One option - create a procedure with following signature (for example in your form)

procedure myCommitError(Sender: TObject; const ErrorMsg: String);

(and of course implement it as well)

and then just assign it before you use the database

database.OnCommitError := myCommitError;

Raul
Image