You are not logged in.
Pages: 1
Hello
If a RawUTF8 field is defined without an index modifier mORMotVCL sets the DataSize to 1 in
procedure TSynSQLTableDataSet.InternalInitFieldDefs;
.
.
.
.
sftUTF8Text: begin
DataSize := fTable.FieldLengthMax(F,True); // <--- Here 1 is returned if no MaxSize defined
{$ifndef UNICODE} // for Delphi 2009+ TWideStringField = UnicodeString!
if fForceWideString then
DBType := ftWideString else
{$endif}
DBType := ftDefaultVCLString;
end;
I propose the following change :
procedure TSynSQLTableDataSet.InternalInitFieldDefs;
.
.
.
.
sftUTF8Text: begin
DataSize := fTable.FieldLengthMax(F,false);
if DataSize = 0 then // variable length
DataSize := dsMaxStringSize; // this is the maximum size DB unit can handle.
{$ifndef UNICODE} // for Delphi 2009+ TWideStringField = UnicodeString!
if fForceWideString then
DBType := ftWideString else
{$endif}
DBType := ftDefaultVCLString;
end;
Greetings
Offline
Pages: 1