97 |
|
{Database Information} |
98 |
|
function GetBlobMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IBlobMetaData; |
99 |
|
function GetArrayMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IArrayMetaData; |
100 |
+ |
procedure getFBVersion(version: TStrings); |
101 |
|
end; |
102 |
|
|
103 |
|
implementation |
105 |
|
uses FB30Transaction, FB30Statement, FB30Array, FB30Blob, FBMessages, |
106 |
|
FBOutputBlock, FB30Events, IBUtils; |
107 |
|
|
108 |
+ |
type |
109 |
+ |
{ TVersionCallback } |
110 |
+ |
|
111 |
+ |
TVersionCallback = class(Firebird.IVersionCallbackImpl) |
112 |
+ |
private |
113 |
+ |
FOutput: TStrings; |
114 |
+ |
public |
115 |
+ |
constructor Create(output: TStrings); |
116 |
+ |
procedure callback(status: Firebird.IStatus; text: PAnsiChar); override; |
117 |
+ |
end; |
118 |
+ |
|
119 |
+ |
{ TVersionCallback } |
120 |
+ |
|
121 |
+ |
constructor TVersionCallback.Create(output: TStrings); |
122 |
+ |
begin |
123 |
+ |
inherited Create; |
124 |
+ |
FOutput := output; |
125 |
+ |
end; |
126 |
+ |
|
127 |
+ |
procedure TVersionCallback.callback(status: Firebird.IStatus; text: PAnsiChar); |
128 |
+ |
begin |
129 |
+ |
FOutput.Add(text); |
130 |
+ |
end; |
131 |
+ |
|
132 |
+ |
|
133 |
|
{ TFB30Attachment } |
134 |
|
|
135 |
|
procedure TFB30Attachment.CheckHandle; |
402 |
|
Result := TFB30ArrayMetaData.Create(self,Transaction as TFB30Transaction,tableName,columnName); |
403 |
|
end; |
404 |
|
|
405 |
+ |
procedure TFB30Attachment.getFBVersion(version: TStrings); |
406 |
+ |
var bufferObj: TVersionCallback; |
407 |
+ |
begin |
408 |
+ |
bufferObj := TVersionCallback.Create(version); |
409 |
+ |
try |
410 |
+ |
with FFirebird30ClientAPI do |
411 |
+ |
UtilIntf.getFbVersion(StatusIntf,FAttachmentIntf,bufferObj); |
412 |
+ |
finally |
413 |
+ |
bufferObj.Free; |
414 |
+ |
end; |
415 |
+ |
end; |
416 |
+ |
|
417 |
|
end. |
418 |
|
|