I have BDS 2010 + UniDAC 3.00.0.3 + MySQL 5.0.
I try to do this:
Code: Select all
IF Trim(IDEd.Text)'' THEN
begin
DM.MonQuery.Filtered:=False;
DM.MonQuery.Filter := 'UID LIKE ' + QuotedStr('%'+IDEd.Text+'%');
DM.MonQuery.Filtered:=true;
end
else DM.MonQuery.Filtered:=False;
But in theory it should not be important.
For example I put in IDEd(TEdit) value 3.
The value of the filter becomes 'UID LIKE '%3%''
But I get an error: Could not convert variant type of (UnicodeString) into type (Double).
Error retriving in this line
Code: Select all
DM.MonQuery.Filtered:=true;
Indeed, in this case there is no need to cast to double.
How can I avoid this error?[/code]