56 |
|
FPrepared: Boolean; |
57 |
|
FParams: TParams; |
58 |
|
FText: string; |
59 |
– |
FRowsAffected: Integer; |
60 |
– |
FCheckRowsAffected: Boolean; |
59 |
|
FSQLUpdating: boolean; |
60 |
|
FInQueryChanged: boolean; |
61 |
|
function GetRowsAffected: Integer; |
135 |
|
property TransactionFree; |
136 |
|
property OnFilterRecord; |
137 |
|
property OnValidatePost; |
138 |
+ |
property OnDeleteReturning; |
139 |
|
end; |
140 |
|
|
141 |
|
implementation |
151 |
|
TStringList(SQL).OnChange := QueryChanged; |
152 |
|
FParams := TParams.Create(Self); |
153 |
|
ParamCheck := True; |
155 |
– |
FRowsAffected := -1; |
154 |
|
end; |
155 |
|
|
156 |
|
destructor TIBQuery.Destroy; |
295 |
|
begin |
296 |
|
if Value then |
297 |
|
begin |
300 |
– |
FRowsAffected := -1; |
301 |
– |
FCheckRowsAffected := True; |
298 |
|
if Length(Text) > 1 then PrepareSQL |
299 |
|
else IBError(ibxeEmptySQLStatement, [nil]); |
300 |
|
end |
301 |
|
else |
302 |
|
begin |
307 |
– |
if FCheckRowsAffected then |
308 |
– |
FRowsAffected := RowsAffected; |
303 |
|
InternalUnPrepare; |
304 |
|
FParams.Clear; |
305 |
|
end; |
372 |
|
begin |
373 |
|
CheckInActive; |
374 |
|
if SQL.Count <= 0 then |
381 |
– |
begin |
382 |
– |
FCheckRowsAffected := False; |
375 |
|
IBError(ibxeEmptySQLStatement, [nil]); |
376 |
< |
end; |
376 |
> |
|
377 |
|
ActivateConnection(); |
378 |
|
DidActivate := ActivateTransaction; |
379 |
|
try |
384 |
|
finally |
385 |
|
if DidActivate then |
386 |
|
DeactivateTransaction; |
395 |
– |
FCheckRowsAffected := True; |
387 |
|
end; |
388 |
|
end; |
389 |
|
|