ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/client/2.5/FB25Attachment.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/2.5/FB25Attachment.pas (file contents):
Revision 117 by tony, Mon Jan 22 13:58:11 2018 UTC vs.
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC

# Line 54 | Line 54 | type
54      constructor CreateDatabase(DatabaseName: AnsiString; aDPB: IDPB; RaiseExceptionOnError: boolean); overload;
55      constructor CreateDatabase(sql: AnsiString; aSQLDialect: integer;
56        RaiseExceptionOnError: boolean); overload;
57 +    function GetDBInfo(ReqBuffer: PByte; ReqBufLen: integer): IDBInformation; override;
58      property Handle: TISC_DB_HANDLE read FHandle;
59  
60    public
# Line 89 | Line 90 | type
90  
91      function GetBlobMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IBlobMetaData;
92      function GetArrayMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IArrayMetaData;
92    function GetDBInformation(Requests: array of byte): IDBInformation; overload; override;
93    function GetDBInformation(Request: byte): IDBInformation; overload; override;
93    end;
94  
95   implementation
# Line 160 | Line 159 | begin
159    DPBFromCreateSQL(sql);
160   end;
161  
162 + function TFB25Attachment.GetDBInfo(ReqBuffer: PByte; ReqBufLen: integer
163 +  ): IDBInformation;
164 + begin
165 +  Result := TDBInformation.Create;
166 +  with Firebird25ClientAPI, Result as TDBInformation do
167 +     if isc_database_info(StatusVector, @(FHandle), ReqBufLen, ReqBuffer,
168 +                               getBufSize, Buffer) > 0 then
169 +          IBDataBaseError;
170 + end;
171 +
172   procedure TFB25Attachment.Connect;
173   begin
174    FSQLDialect := 3;
# Line 343 | Line 352 | begin
352    Result := TFB25ArrayMetaData.Create(self,Transaction as TFB25Transaction,tableName,columnName);
353   end;
354  
346 function TFB25Attachment.GetDBInformation(Requests: array of byte
347  ): IDBInformation;
348 var ReqBuffer: PByte;
349    i: integer;
350 begin
351  CheckHandle;
352  if Length(Requests) = 1 then
353    Result := GetDBInformation(Requests[0])
354  else
355  begin
356    Result := TDBInformation.Create;
357    GetMem(ReqBuffer,Length(Requests));
358    try
359      for i := 0 to Length(Requests) - 1 do
360        ReqBuffer[i] := Requests[i];
361
362      with Firebird25ClientAPI, Result as TDBInformation do
363          if isc_database_info(StatusVector, @(FHandle), Length(Requests), ReqBuffer,
364                                 getBufSize, Buffer) > 0 then
365            IBDataBaseError;
366
367    finally
368      FreeMem(ReqBuffer);
369    end;
370  end;
371 end;
372
373 function TFB25Attachment.GetDBInformation(Request: byte): IDBInformation;
374 begin
375  CheckHandle;
376  Result := TDBInformation.Create;
377  with Firebird25ClientAPI, Result as TDBInformation do
378    if isc_database_info(StatusVector, @(FHandle), 1, @Request,
379                           getBufSize, Buffer) > 0 then
380      IBDataBaseError;
381 end;
382
355   end.
356  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines