Here is the code I use to filter the content of my TMyStoredProc after having retrieved data from the database :
---------------------------------------------------------------------------------
Code: Select all
procedure MyOwnClass.ExecuteFilter(const pc_valueToSearch : String);
var
FilterValue : String;
begin
if (pc_valueToSearch = EmptyStr) then
begin
FilterValue := EmptyStr;
end
else
begin
FilterValue := 'aFieldName LIKE ' + QuotedStr('%' + pc_valueToSearch + '%');
end;
pxyMySPMaster.Filtered := false;
pxyMySPMaster.Filter := FilterValue;
pxyMySPMaster.Filtered := true;
end;
The result is just empty ??? But the exactly same code DOES work with a simple TClientDataSet with the same columns and data ?
Thanks for your help.