250 |
|
private |
251 |
|
FCompletionState: Firebird.IBatchCompletionState; |
252 |
|
FFirebird30ClientAPI: TFB30ClientAPI; |
253 |
+ |
FStatus: IStatus; |
254 |
|
public |
255 |
|
constructor Create(api: TFB30ClientAPI; cs: IBatchCompletionState); |
256 |
|
destructor Destroy; override; |
342 |
|
inherited Create; |
343 |
|
FFirebird30ClientAPI := api; |
344 |
|
FCompletionState := cs; |
345 |
+ |
FStatus := api.GetStatus.clone; |
346 |
|
end; |
347 |
|
|
348 |
|
destructor TBatchCompletion.Destroy; |
360 |
|
var i: integer; |
361 |
|
upcount: cardinal; |
362 |
|
state: integer; |
361 |
– |
FBStatus: Firebird.IStatus; |
363 |
|
begin |
364 |
|
Result := false; |
365 |
|
RowNo := -1; |
365 |
– |
FBStatus := nil; |
366 |
|
with FFirebird30ClientAPI do |
367 |
|
begin |
368 |
|
upcount := FCompletionState.getSize(StatusIntf); |
373 |
|
if state = Firebird.IBatchCompletionState.EXECUTE_FAILED then |
374 |
|
begin |
375 |
|
RowNo := i+1; |
376 |
< |
FBStatus := MasterIntf.getStatus; |
377 |
< |
try |
378 |
< |
FCompletionState.getStatus(StatusIntf,FBStatus,i); |
379 |
< |
Check4DataBaseError; |
380 |
< |
except |
381 |
< |
FBStatus.dispose; |
382 |
< |
raise |
383 |
< |
end; |
384 |
< |
status := TFB30StatusObject.Create(FFirebird30ClientAPI,FBStatus, |
385 |
< |
Format(SBatchCompletionError,[RowNo])); |
386 |
< |
status.SetIBDataBaseErrorMessages(GetStatus.GetIBDataBaseErrorMessages); |
376 |
> |
FCompletionState.getStatus(StatusIntf,(FStatus as TFB30Status).GetStatus,i); |
377 |
> |
Check4DataBaseError; |
378 |
> |
status := FStatus; |
379 |
|
Result := true; |
380 |
|
break; |
381 |
|
end; |