I use Delphi 7 with Zeos 6.6.0-beta, before used Zeos 6.6.0-beta I used an old version Zeos 6.1.5-stable.
I have problem in Delphi with new Zeos component. Before upgrade to 6.6.0-beta the code work fine. Error occured when checking the value of that field. If the value of that field is NULL or when the IF condition below is FALSE.
Below is quoted of my code.
------begin--------
if not zquery1.FieldByName('disc_cash').IsNull then
zquery2.FieldByName('disc_cash').AsCurrency := zquery1.FieldValues['disc_cash'];
------end----------
The error message appear :
... exception class EDatabaseError with message 'Field 'disc_cash' must have a value'.
I suppose disc_cash in zquery2 is defined as 'not null default 0' (or something similar putting a default on it). Try to set the required property of the field to false before inserting.
Yes, the problem on zQuery2, default for field required property is set to true. On old version of zeos, default field required property is set to false.