55 |
|
constructor CreateDatabase(sql: AnsiString; aSQLDialect: integer; |
56 |
|
RaiseExceptionOnError: boolean); overload; |
57 |
|
destructor Destroy; override; |
58 |
+ |
function GetDBInfo(ReqBuffer: PByte; ReqBufLen: integer): IDBInformation; |
59 |
+ |
override; |
60 |
|
property AttachmentIntf: Firebird.IAttachment read FAttachmentIntf; |
61 |
|
|
62 |
|
public |
95 |
|
{Database Information} |
96 |
|
function GetBlobMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IBlobMetaData; |
97 |
|
function GetArrayMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IArrayMetaData; |
96 |
– |
function GetDBInformation(Requests: array of byte): IDBInformation; overload; override; |
97 |
– |
function GetDBInformation(Request: byte): IDBInformation; overload; override; |
98 |
|
end; |
99 |
|
|
100 |
|
implementation |
183 |
|
FAttachmentIntf.release; |
184 |
|
end; |
185 |
|
|
186 |
+ |
function TFB30Attachment.GetDBInfo(ReqBuffer: PByte; ReqBufLen: integer): IDBInformation; |
187 |
+ |
begin |
188 |
+ |
Result := TDBInformation.Create; |
189 |
+ |
with Firebird30ClientAPI, Result as TDBInformation do |
190 |
+ |
begin |
191 |
+ |
FAttachmentIntf.getInfo(StatusIntf, ReqBufLen, BytePtr(ReqBuffer), |
192 |
+ |
getBufSize, BytePtr(Buffer)); |
193 |
+ |
Check4DataBaseError; |
194 |
+ |
end |
195 |
+ |
end; |
196 |
+ |
|
197 |
|
procedure TFB30Attachment.Connect; |
198 |
|
begin |
199 |
|
with Firebird30ClientAPI do |
371 |
|
Result := TFB30ArrayMetaData.Create(self,Transaction as TFB30Transaction,tableName,columnName); |
372 |
|
end; |
373 |
|
|
363 |
– |
function TFB30Attachment.GetDBInformation(Requests: array of byte |
364 |
– |
): IDBInformation; |
365 |
– |
var ReqBuffer: PByte; |
366 |
– |
i: integer; |
367 |
– |
begin |
368 |
– |
CheckHandle; |
369 |
– |
if Length(Requests) = 1 then |
370 |
– |
Result := GetDBInformation(Requests[0]) |
371 |
– |
else |
372 |
– |
begin |
373 |
– |
Result := TDBInformation.Create; |
374 |
– |
GetMem(ReqBuffer,Length(Requests)); |
375 |
– |
try |
376 |
– |
for i := 0 to Length(Requests) - 1 do |
377 |
– |
ReqBuffer[i] := Requests[i]; |
378 |
– |
|
379 |
– |
with Firebird30ClientAPI, Result as TDBInformation do |
380 |
– |
begin |
381 |
– |
FAttachmentIntf.getInfo(StatusIntf, Length(Requests), BytePtr(ReqBuffer), |
382 |
– |
getBufSize, BytePtr(Buffer)); |
383 |
– |
Check4DataBaseError; |
384 |
– |
end |
385 |
– |
|
386 |
– |
finally |
387 |
– |
FreeMem(ReqBuffer); |
388 |
– |
end; |
389 |
– |
end; |
390 |
– |
end; |
391 |
– |
|
392 |
– |
function TFB30Attachment.GetDBInformation(Request: byte): IDBInformation; |
393 |
– |
begin |
394 |
– |
CheckHandle; |
395 |
– |
Result := TDBInformation.Create; |
396 |
– |
with Firebird30ClientAPI, Result as TDBInformation do |
397 |
– |
begin |
398 |
– |
FAttachmentIntf.getInfo(StatusIntf, 1, BytePtr(@Request), |
399 |
– |
getBufSize, BytePtr(Buffer)); |
400 |
– |
Check4DataBaseError; |
401 |
– |
end; |
402 |
– |
end; |
403 |
– |
|
374 |
|
end. |
375 |
|
|