Browse Source

* fix for returned value is bigger than previous returned value in
oracle. Fix from Mantis #19341 for earlier issue related to Mantis #18133

git-svn-id: branches/fixes_2_6@19297 -

marco 14 years ago
parent
commit
7075cd2935
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/fcl-db/src/sqldb/oracle/oracleconnection.pp

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

@@ -41,6 +41,7 @@ type
     Buffer : pointer;
     Ind    : sb2;
     Len    : ub4;
+    Size   : ub4;
   end;
 
   TOracleCursor = Class(TSQLCursor)
@@ -132,6 +133,7 @@ begin
 //only 1 row can be stored. No support for multiple rows. When multiple rows, only last is kept.
   bufpp^:=TOraFieldBuf(octxp^).Buffer;
   indp^ := @TOraFieldBuf(octxp^).Ind;
+  TOraFieldBuf(octxp^).Len:=TOraFieldBuf(octxp^).Size;   //reset size to full buffer
   alenp^ := @TOraFieldBuf(octxp^).Len;
   rcodep^:=nil;
   piecep^ := OCI_ONE_PIECE;
@@ -370,7 +372,8 @@ begin
 
         end;
         parambuffers[tel].buffer := getmem(OFieldSize);
-        parambuffers[tel].len := OFieldSize;
+        parambuffers[tel].Len := OFieldSize;
+        parambuffers[tel].Size := OFieldSize;
 
 
         FOciBind := nil;