--- ibx/branches/journaling/fbintf/client/2.5/FB25Statement.pas 2021/12/07 13:27:39 362 +++ ibx/branches/journaling/fbintf/client/2.5/FB25Statement.pas 2021/12/07 13:30:05 363 @@ -123,7 +123,6 @@ type FStatement: TFB25Statement; FFirebird25ClientAPI: TFB25ClientAPI; FBlob: IBlob; {Cache references} - FArray: IArray; FNullIndicator: short; FOwnsSQLData: boolean; FBlobMetaData: IBlobMetaData; @@ -159,7 +158,7 @@ type constructor Create(aParent: TIBXSQLDA; aIndex: integer); procedure FreeSQLData; procedure RowChange; override; - function GetAsArray(Array_ID: TISC_QUAD): IArray; override; + function GetAsArray: IArray; override; function GetAsBlob(Blob_ID: TISC_QUAD; BPB: IBPB): IBlob; override; function GetArrayMetaData: IArrayMetaData; override; function GetBlobMetaData: IBlobMetaData; override; @@ -193,6 +192,7 @@ type public constructor Create(aStatement: TFB25Statement); destructor Destroy; override; + function CanChangeMetaData: boolean; override; function CheckStatementStatus(Request: TStatementStatus): boolean; override; function ColumnsInUseCount: integer; override; function GetTransaction: TFB25Transaction; virtual; @@ -264,6 +264,7 @@ type protected procedure CheckHandle; override; procedure GetDsqlInfo(info_request: byte; buffer: ISQLInfoResults); override; + function GetStatementIntf: IStatement; override; procedure InternalPrepare(CursorName: AnsiString=''); override; function InternalExecute(aTransaction: ITransaction): IResults; override; function InternalOpenCursor(aTransaction: ITransaction; Scrollable: boolean): IResultSet; override; @@ -429,7 +430,7 @@ begin Result := FBlobMetaData; end; -function TIBXSQLVAR.GetAsArray(Array_ID: TISC_QUAD): IArray; +function TIBXSQLVAR.GetAsArray: IArray; begin if SQLType <> SQL_ARRAY then IBError(ibxeInvalidDataConversion,[nil]); @@ -438,11 +439,11 @@ begin Result := nil else begin - if FArray = nil then - FArray := TFB25Array.Create(FStatement.GetAttachment as TFB25Attachment, + if FArrayIntf = nil then + FArrayIntf := TFB25Array.Create(FStatement.GetAttachment as TFB25Attachment, TIBXSQLDA(Parent).GetTransaction, - GetArrayMetaData,Array_ID); - Result := FArray; + GetArrayMetaData,PISC_QUAD(SQLData)^); + Result := FArrayIntf; end; end; @@ -614,7 +615,6 @@ procedure TIBXSQLVAR.RowChange; begin inherited RowChange; FBlob := nil; - FArray := nil; end; @@ -796,6 +796,11 @@ begin inherited Destroy; end; +function TIBXSQLDA.CanChangeMetaData: boolean; +begin + Result := true; +end; + function TIBXSQLDA.CheckStatementStatus(Request: TStatementStatus): boolean; begin Result := false; @@ -975,6 +980,11 @@ begin IBDatabaseError; end; +function TFB25Statement.GetStatementIntf: IStatement; +begin + Result := self; +end; + procedure TFB25Statement.InternalPrepare(CursorName: AnsiString); var GUID: TGUID;