39 |
|
|
40 |
|
uses |
41 |
|
Classes, SysUtils, IB, FBArray, IBHeader, FB25Statement, FB25Attachment, FBClientAPI, |
42 |
< |
FB25Transaction; |
42 |
> |
FB25Transaction, FB25ClientAPI; |
43 |
|
|
44 |
|
type |
45 |
|
|
62 |
|
private |
63 |
|
FDBHandle: TISC_DB_HANDLE; |
64 |
|
FTRHandle: TISC_TR_HANDLE; |
65 |
+ |
FFirebird25ClientAPI: TFB25ClientAPI; |
66 |
|
protected |
67 |
|
procedure InternalGetSlice; override; |
68 |
|
procedure InternalPutSlice(Force: boolean); override; |
73 |
|
|
74 |
|
implementation |
75 |
|
|
76 |
< |
uses FBAttachment, FB25ClientAPI; |
76 |
> |
uses FBAttachment; |
77 |
|
|
78 |
|
const |
79 |
|
sGetArrayMetaData = 'Select F.RDB$CHARACTER_SET_ID '+ |
102 |
|
TRHandle := (aTransaction as TFB25Transaction).Handle; |
103 |
|
RelName := AnsiUpperCase(relationName); |
104 |
|
ColName := AnsiUpperCase(columnName); |
105 |
< |
with Firebird25ClientAPI do |
105 |
> |
with (aAttachment as TFB25Attachment).Firebird25ClientAPI do |
106 |
|
if isc_array_lookup_bounds(StatusVector,@(DBHandle),@(TRHandle), |
107 |
|
PAnsiChar(RelName),PAnsiChar(ColName),@FArrayDesc) > 0 then |
108 |
|
IBDatabaseError; |
158 |
|
|
159 |
|
procedure TFB25Array.InternalGetSlice; |
160 |
|
begin |
161 |
< |
with Firebird25ClientAPI do |
161 |
> |
with FFirebird25ClientAPI do |
162 |
|
Call(isc_array_get_slice(StatusVector,@(FDBHandle),@(FTRHandle), |
163 |
|
@FArrayID, GetArrayDesc, |
164 |
|
Pointer(FBuffer), @FBufSize)); |
166 |
|
|
167 |
|
procedure TFB25Array.InternalPutSlice(Force: boolean); |
168 |
|
begin |
169 |
< |
with Firebird25ClientAPI do |
169 |
> |
with FFirebird25ClientAPI do |
170 |
|
if (isc_array_put_slice(StatusVector, @(FDBHandle),@(FTRHandle), |
171 |
|
@FArrayID, GetArrayDesc, |
172 |
|
Pointer(FBuffer),@FBufSize) > 0) and not Force then |
180 |
|
inherited Create(aAttachment,aTransaction,aField); |
181 |
|
FDBHandle := aAttachment.Handle; |
182 |
|
FTRHandle := aTransaction.Handle; |
183 |
+ |
FFirebird25ClientAPI := aAttachment.Firebird25ClientAPI; |
184 |
+ |
OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError; |
185 |
|
end; |
186 |
|
|
187 |
|
constructor TFB25Array.Create(aAttachment: TFB25Attachment; |
190 |
|
inherited Create(aAttachment,aTransaction,aField,ArrayID); |
191 |
|
FDBHandle := aAttachment.Handle; |
192 |
|
FTRHandle := aTransaction.Handle; |
193 |
+ |
FFirebird25ClientAPI := aAttachment.Firebird25ClientAPI; |
194 |
+ |
OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError; |
195 |
|
end; |
196 |
|
|
197 |
|
end. |