Explorar el Código

Merged revisions 11279-11282,11285 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r11279 | joost | 2008-06-25 22:40:18 +0200 (Wed, 25 Jun 2008) | 1 line

* Also for Oracle: TBCDField.Size should contain the amount of digits after the decimal-sign, not the full size (bug 11544)
........
r11285 | joost | 2008-06-26 22:21:22 +0200 (Thu, 26 Jun 2008) | 1 line

* Fix ftBCDField after r11279
........

git-svn-id: branches/rc_2_2_2@11294 -

joost hace 17 años
padre
commit
524cd65bde
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      packages/fcl-db/src/sqldb/oracle/oracleconnection.pp

+ 2 - 2
packages/fcl-db/src/sqldb/oracle/oracleconnection.pp

@@ -367,7 +367,7 @@ begin
                                 else if (oscale <=4) and (OPrecision<=12) then
                                   begin
                                   FieldType := ftBCD;
-                                  FieldSize := sizeof(Currency);
+                                  FieldSize := oscale;
                                   OFieldType := SQLT_VNU;
                                   OFieldSize:= 22;
                                   end
@@ -455,7 +455,7 @@ begin
                                cur := cur + (101-b[i]) * intpower(100,-(i-2)+exp);
                              cur := -cur;
                              end;
-                           move(cur,buffer^,FieldDef.Size);
+                           move(cur,buffer^,SizeOf(Currency));
                            end;
       ftFloat           : move(fieldbuffers[FieldDef.FieldNo-1].buffer^,buffer^,sizeof(double));
       ftInteger         : move(fieldbuffers[FieldDef.FieldNo-1].buffer^,buffer^,sizeof(integer));