diff --git a/packages/fcl-db/src/sqlite/sqlite3ds.pas b/packages/fcl-db/src/sqlite/sqlite3ds.pas index 47d98da34e..0c0c39d18b 100644 --- a/packages/fcl-db/src/sqlite/sqlite3ds.pas +++ b/packages/fcl-db/src/sqlite/sqlite3ds.pas @@ -169,7 +169,10 @@ begin begin AType := ftString; end; - FieldDefs.Add(StrPas(sqlite3_column_name(vm,i)), AType, 0, False); + if AType = ftString then + FieldDefs.Add(StrPas(sqlite3_column_name(vm,i)), AType, dsMaxStringSize) + else + FieldDefs.Add(StrPas(sqlite3_column_name(vm,i)), AType); //Set the pchar2sql function if AType in [ftString,ftMemo] then FGetSqlStr[i]:=@Char2SqlStr diff --git a/packages/fcl-db/src/sqlite/sqliteds.pas b/packages/fcl-db/src/sqlite/sqliteds.pas index 948ac9bb79..702332c092 100644 --- a/packages/fcl-db/src/sqlite/sqliteds.pas +++ b/packages/fcl-db/src/sqlite/sqliteds.pas @@ -173,8 +173,11 @@ begin end else begin AType := ftString; - end; - FieldDefs.Add(StrPas(ColumnNames[i]), AType, 0, False); + end; + if AType = ftString then + FieldDefs.Add(StrPas(ColumnNames[i]), AType, dsMaxStringSize) + else + FieldDefs.Add(StrPas(ColumnNames[i]), AType); //Set the pchar2sql function if AType in [ftString,ftMemo] then FGetSqlStr[i]:=@Char2SqlStr