Please help with using constraint
Posted: Wed 28 May 2014 09:22
I'm using Delphi 7 and like to migrate from BDE to uniDAC.
I'm trying to setup constraint on TField level, it's used to work on BDE, this is what I have done. Also uniDAC is using standard Delphi's TField descendants I have no ideas what went wrong.
When the program is running nothing happen, the program is still accept invalid input.
Please help.
Thanks.
I'm trying to setup constraint on TField level, it's used to work on BDE, this is what I have done. Also uniDAC is using standard Delphi's TField descendants I have no ideas what went wrong.
Code: Select all
UniQuery1gender: TStringField;
UniQuery1gender.CustomConstraint := 'x in (''M'',''F'')';
UniQuery1gender.ConstraintErrorMessage := 'Gender must be M/F only';Please help.
Thanks.