[patch_done] MySQL Exception "field must have a value&q
Posted: 14.11.2006, 14:40
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)<>'') );
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)<>'') );