Validate Input

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Guest

Validate Input

Post by Guest » Wed 24 May 2006 11:29

Hi there,

got a question about validatin an tdbedit field.
I have an editField thats bound on an integer-field in the database.

When entering an invalid integer-value like '11-22', after leavin the field MyDac come up with the message '11-22 is not a valid integer'.

I want to be able to handle this error-messages by myself, but don't know how, because the 'onExit'-event occurs after the mydac-validation.

thx for help,
ben

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 25 May 2006 09:07

The data aware component calls the method SetEditText of TField to set data, but before setting text, TField raises event OnSetText. Possibly handling this event will solve this problem.

Post Reply