Browse Source

fcl-db: odbc: when binding TIMESTAMP parameter set explicitly precision.
It is required by SQL Server Native Client 2008 and later (when not set it raises: Datetime field overflow. Fractional second precision exceeds the scale specified in the parameter binding.)
I have used precision 3 (milliseconds), which is maximum precision returned by DecodeTime used in handling of TDataTime values.

git-svn-id: trunk@29719 -

lacak 10 years ago
parent
commit
1e778468cc
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/fcl-db/src/sqldb/odbc/odbcconn.pas

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

@@ -465,6 +465,7 @@ begin
           CType:=SQL_C_TYPE_TIMESTAMP;
           SqlType:=SQL_TYPE_TIMESTAMP;
           ColumnSize:=23;
+          DecimalDigits:=3; // fractional seconds
         end;
       ftBoolean:
         begin