instead of TSmallIntField (checkboxes in grid)
unfortunately this patch only disables exception for persistent fields
I dont know how to deal with dynamic fields autodetection
maybe someone else can do this
Code: Select all
procedure TZAbstractRODataset.CheckFieldCompatibility(Field: TField;FieldDef: TFieldDef);
(...)
CheckTypeSizes = [ftBytes, ftVarBytes, ftBCD, ftReference];
begin
+ {MySQL BOOLEAN = TINYINT(1)}
+ if (Field.DataType = ftBoolean) and (FieldDef.DataType = ftSmallint) then
+ exit
+ else
with Field do
begin
if (BaseFieldTypes[DataType] <> BaseFieldTypes[FieldDef.DataType]) then
DatabaseErrorFmt(SFieldTypeMismatch, [DisplayName,
FieldTypeNames[DataType], FieldTypeNames[FieldDef.DataType]], Self);
if (DataType in CheckTypeSizes) and (Size <> FieldDef.Size) then
DatabaseErrorFmt(SFieldSizeMismatch, [DisplayName, Size,
FieldDef.Size], Self);
end;
end;