ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/journaling/runtime/nongui/IBCustomDataSet.pas
(Generate patch)
# Line 2502 | Line 2502
2502   procedure TIBCustomDataSet.UpdateRecordFromQuery(QryResults: IResults;
2503    Buffer: PChar);
2504   var i, j: integer;
2505 +    pda: PArrayDataArray;
2506 +    pbd: PBlobDataArray;
2507   begin
2508 +  { Make sure blob cache is empty }
2509 +  pbd := PBlobDataArray(Buffer + FBlobCacheOffset);
2510 +  pda := PArrayDataArray(Buffer + FArrayCacheOffset);
2511 +  for i := 0 to BlobFieldCount - 1 do
2512 +    pbd^[i] := nil;
2513 +  for i := 0 to ArrayFieldCount - 1 do
2514 +    pda^[i] := nil;
2515 +
2516    for i := 0 to QryResults.Count - 1 do
2517    begin
2518      j := GetFieldPosition(QryResults[i].GetAliasName);
# Line 3194 | Line 3204
3204  
3205   procedure TIBCustomDataSet.SetInternalSQLParams(Params: ISQLParams; Buffer: Pointer);
3206   var
3207 <  i, j: Integer;
3207 >  i, j, arr: Integer;
3208    cr, data: PByte;
3209    fn: string;
3210    st: RawByteString;
3211    OldBuffer: Pointer;
3212    Param: ISQLParam;
3213 +  pda: PArrayDataArray;
3214   begin
3215    if (Buffer = nil) then
3216      IBError(ibxeBufferNotSet, [nil]);
# Line 3207 | Line 3218
3218      InternalPrepare;
3219    OldBuffer := nil;
3220    try
3221 +    pda := PArrayDataArray(PChar(Buffer) + FArrayCacheOffset);
3222 +    arr := 0;
3223      for i := 0 to Params.GetCount - 1 do
3224      begin
3225        Param := Params[i];
# Line 3271 | Line 3284
3284                else
3285                  Param.AsDouble := PDouble(data)^;
3286              end;
3287 <            SQL_BLOB, SQL_ARRAY, SQL_QUAD:
3287 >            SQL_BLOB, SQL_QUAD:
3288                Param.AsQuad := PISC_QUAD(data)^;
3289 +            SQL_ARRAY:
3290 +              begin
3291 +                if pda[arr] = nil then
3292 +                  Param.AsQuad := PISC_QUAD(data)^
3293 +                else
3294 +                  Param.AsArray := pda[arr].ArrayIntf;
3295 +                Inc(arr);
3296 +              end;
3297              SQL_TYPE_DATE,
3298              SQL_TYPE_TIME,
3299              SQL_TIMESTAMP:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines