TMyStoredProc / Filter property does not work with LIKE clause ?
Posted: Wed  02 Aug 2006 15:57
				
				Hi,
Here is the code I use to filter the content of my TMyStoredProc after having retrieved data from the database :
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
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.
			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.