106 |
|
FDBHandle: TISC_DB_HANDLE; |
107 |
|
FEventHandlerThread: TObject; |
108 |
|
FAsyncEventCallback: TEventhandlerInterface; |
109 |
+ |
FFirebird25ClientAPI: TFB25ClientAPI; |
110 |
|
protected |
111 |
|
procedure CancelEvents(Force: boolean = false); override; |
112 |
|
function GetIEvents: IEvents; override; |
261 |
|
FCriticalSection.Enter; |
262 |
|
try |
263 |
|
if not FInWaitState then Exit; |
264 |
< |
with Firebird25ClientAPI do |
264 |
> |
with FFirebird25ClientAPI do |
265 |
|
if (Call(isc_Cancel_events( StatusVector, @FDBHandle, @FEventID),false) > 0) and not Force then |
266 |
|
IBDatabaseError; |
267 |
|
|
281 |
|
begin |
282 |
|
inherited Create(DBAttachment,DBAttachment,Events); |
283 |
|
FDBHandle := DBAttachment.Handle; |
284 |
+ |
FFirebird25ClientAPI := DBAttachment.Firebird25ClientAPI; |
285 |
+ |
OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError; |
286 |
|
FAsyncEventCallback := TEventhandlerInterface.Create(self); |
287 |
|
FEventHandlerThread := TEventHandlerThread.Create(self,FAsyncEventCallback); |
288 |
|
end; |
307 |
|
|
308 |
|
FEventHandler := EventHandler; |
309 |
|
callback := @IBEventCallback; |
310 |
< |
with Firebird25ClientAPI do |
310 |
> |
with FFirebird25ClientAPI do |
311 |
|
Call(isc_que_events( StatusVector, @FDBHandle, @FEventID, FEventBufferLen, |
312 |
|
FEventBuffer, TISC_CALLBACK(callback), PVoid(FAsyncEventCallback))); |
313 |
|
FInWaitState := true; |
323 |
|
|
324 |
|
FInWaitState := true; |
325 |
|
try |
326 |
< |
with Firebird25ClientAPI do |
326 |
> |
with FFirebird25ClientAPI do |
327 |
|
Call(isc_wait_for_event(StatusVector,@FDBHandle, FEventBufferlen,FEventBuffer,FResultBuffer)); |
328 |
|
finally |
329 |
|
FInWaitState := false; |