Page 1 of 1

[patch_done] MySQL Exception "field must have a value&q

Posted: 14.11.2006, 14:40
by jottel
After changing form 6.5.1a to 6.6.0b I got this exception whenever I posted a new record where I didn't assign values to those fields which are defined NOT NULL and have default values.
I found a solution that works for me.
Change
in ZAbstractRODataSet, procedure InternalFieldDefs

required := IsNullable(I) = ntNoNulls;

to

required := (IsNullable(I) = ntNoNulls)
and not
( ( (GetDefaultValue(I)='') and
(GetColumnType(I) in [stString, stUnicodeString])
)
or (GetDefaultValue(I)<>'') );

Posted: 15.11.2006, 05:08
by fduenas
Also you can set to each "required" field's property to false.

Posted: 28.03.2007, 07:45
by uwwin
you have to change the zquery.sql.text with the simple query.. like 'select * from tbl_a'

Posted: 14.07.2008, 23:55
by mdaems
Jottel,

Please check current version. (SVN snapshot at http://zeosdownloads/downloads/snapshots/). Normally this should work better now after fixing bug #90

Mark