328 |
|
TIBSQL = class(TComponent) |
329 |
|
private |
330 |
|
FIBLoaded: Boolean; |
331 |
+ |
FOnSQLChanged: TNotifyEvent; |
332 |
|
FUniqueParamNames: Boolean; |
333 |
|
function GetFieldCount: integer; |
334 |
|
procedure SetUniqueParamNames(AValue: Boolean); |
367 |
|
procedure SetSQL(Value: TStrings); |
368 |
|
procedure SetTransaction(Value: TIBTransaction); |
369 |
|
procedure SQLChanging(Sender: TObject); |
370 |
+ |
procedure SQLChanged(Sender: TObject); |
371 |
|
procedure BeforeTransactionEnd(Sender: TObject; Action: TTransactionAction); |
372 |
|
public |
373 |
|
constructor Create(AOwner: TComponent); override; |
414 |
|
property SQL: TStrings read FSQL write SetSQL; |
415 |
|
property Transaction: TIBTransaction read GetTransaction write SetTransaction; |
416 |
|
property OnSQLChanging: TNotifyEvent read FOnSQLChanging write FOnSQLChanging; |
417 |
+ |
property OnSQLChanged: TNotifyEvent read FOnSQLChanged write FOnSQLChanged; |
418 |
|
end; |
419 |
|
|
420 |
|
implementation |
2156 |
|
FRecordCount := 0; |
2157 |
|
FSQL := TStringList.Create; |
2158 |
|
TStringList(FSQL).OnChanging := SQLChanging; |
2159 |
+ |
TStringList(FSQL).OnChange := SQLChanged; |
2160 |
|
FProcessedSQL := TStringList.Create; |
2161 |
|
FHandle := nil; |
2162 |
|
FSQLParams := TIBXSQLDA.Create(self,daInput); |
2820 |
|
if FHandle <> nil then FreeHandle; |
2821 |
|
end; |
2822 |
|
|
2823 |
+ |
procedure TIBSQL.SQLChanged(Sender: TObject); |
2824 |
+ |
begin |
2825 |
+ |
if assigned(OnSQLChanged) then |
2826 |
+ |
OnSQLChanged(self); |
2827 |
+ |
end; |
2828 |
+ |
|
2829 |
|
procedure TIBSQL.BeforeTransactionEnd(Sender: TObject; |
2830 |
|
Action: TTransactionAction); |
2831 |
|
begin |