Browse Source

odbc: fix long string parameter bindings

Ondrej Pokorny 3 years ago
parent
commit
fefb13da3b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/fcl-db/src/sqldb/odbc/odbcconn.pas

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

@@ -506,8 +506,8 @@ begin
           BufferLength:=Size;
           CType:=SQL_C_WCHAR;
           case AParams[ParamIndex].DataType of
-            ftMemo, ftWideMemo: SqlType:=SQL_WLONGVARCHAR;
-            else        SqlType:=SQL_WVARCHAR;
+            ftFixedChar, ftFixedWideChar: SqlType:=SQL_WVARCHAR;
+            else SqlType:=SQL_WLONGVARCHAR;
           end;
         end;
       ftSingle: