mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 01:20:20 +02:00
* Proper fix for 35887
git-svn-id: trunk@42933 -
This commit is contained in:
parent
0bbe319d4c
commit
aee20cd54d
@ -508,6 +508,7 @@ type
|
|||||||
procedure SetUpdateMode(AValue : TUpdateMode);
|
procedure SetUpdateMode(AValue : TUpdateMode);
|
||||||
procedure OnChangeModifySQL(Sender : TObject);
|
procedure OnChangeModifySQL(Sender : TObject);
|
||||||
procedure Execute;
|
procedure Execute;
|
||||||
|
procedure ApplyFilter;
|
||||||
Function AddFilter(SQLstr : string) : string;
|
Function AddFilter(SQLstr : string) : string;
|
||||||
protected
|
protected
|
||||||
function CreateSQLStatement(aOwner: TComponent): TCustomSQLStatement; virtual;
|
function CreateSQLStatement(aOwner: TComponent): TCustomSQLStatement; virtual;
|
||||||
@ -2695,6 +2696,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomSQLQuery.ApplyFilter;
|
||||||
|
|
||||||
|
begin
|
||||||
|
FStatement.Unprepare;
|
||||||
|
FStatement.DoPrepare;
|
||||||
|
FStatement.DoExecute;
|
||||||
|
InternalRefresh;
|
||||||
|
First;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomSQLQuery.SetActive(Value: Boolean);
|
procedure TCustomSQLQuery.SetActive(Value: Boolean);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -2713,11 +2724,7 @@ begin
|
|||||||
if (ServerFiltered <> Value) then
|
if (ServerFiltered <> Value) then
|
||||||
begin
|
begin
|
||||||
FServerFiltered := Value;
|
FServerFiltered := Value;
|
||||||
if Active then
|
if Active then ApplyFilter;
|
||||||
begin
|
|
||||||
Close;
|
|
||||||
Open;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2726,11 +2733,7 @@ begin
|
|||||||
if Value <> ServerFilter then
|
if Value <> ServerFilter then
|
||||||
begin
|
begin
|
||||||
FServerFilterText := Value;
|
FServerFilterText := Value;
|
||||||
if Active then
|
if Active then ApplyFilter;
|
||||||
begin
|
|
||||||
Close;
|
|
||||||
Open;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user