Browse Source

fcl-db: odbc: increase max. allowed string field length. Fix for existing tests TTestFieldTypes.TestStringLargerThen8192 and TestInsertLargeStrFields. (similar like rev.23141, 23198)

git-svn-id: trunk@24389 -
lacak 12 years ago
parent
commit
2d352b0204
1 changed files with 2 additions and 4 deletions
  1. 2 4
      packages/fcl-db/src/sqldb/odbc/odbcconn.pas

+ 2 - 4
packages/fcl-db/src/sqldb/odbc/odbcconn.pas

@@ -1185,9 +1185,9 @@ begin
     end;
 
     if (FieldType in [ftString,ftFixedChar]) and // field types mapped to TStringField
-       (FieldSize >= dsMaxStringSize) then
+       (FieldSize > MaxSmallint) then
     begin
-      FieldSize:=dsMaxStringSize-1;
+      FieldSize := MaxSmallint;
     end
     else
     // any exact numeric type with scale 0 can have identity attr.
@@ -1536,8 +1536,6 @@ begin
 end;
 
 destructor TODBCCursor.Destroy;
-var
-  Res:SQLRETURN;
 begin
 {$IF NOT((FPC_VERSION>=2) AND (FPC_RELEASE>=1))}
   FBlobStreams.Free;