Browse Source

* Fix for non-i386 platforms

git-svn-id: trunk@17849 -
michael 14 years ago
parent
commit
2a3180c3d1
1 changed files with 6 additions and 2 deletions
  1. 6 2
      packages/fcl-db/src/sqldb/interbase/ibconnection.pp

+ 6 - 2
packages/fcl-db/src/sqldb/interbase/ibconnection.pp

@@ -780,7 +780,8 @@ var
   // This should be a pointer, because the ORIGINAL variables must
   // be modified.
   VSQLVar: ^XSQLVAR;
-
+  d : double;
+  
 begin
 {$R-}
   with cursor as TIBCursor do for SQLVarNr := 0 to High(ParamBinding){AParams.count-1} do
@@ -843,7 +844,10 @@ begin
             if VSQLVar^.sqlscale = 0 then
               li := AParams[ParNr].AsLargeInt
             else if AParams[ParNr].DataType = ftFMTBcd then
-              li := Round(AParams[ParNr].AsFMTBCD * IntPower(10, -VSQLVar^.sqlscale))
+              begin
+              d:=AParams[ParNr].AsFMTBCD * IntPower(10, -VSQLVar^.sqlscale);
+              li := Round(d)
+              end
             else
               li := Round(AParams[ParNr].AsCurrency * IntPower(10, -VSQLVar^.sqlscale));
             Move(li, VSQLVar^.SQLData^, VSQLVar^.SQLLen);