UniQuery.Filter.Error.
Posted: Thu 02 Sep 2010 03:52
Hi.
I have BDS 2010 + UniDAC 3.00.0.3 + MySQL 5.0.
I try to do this:
The field "UID" has type integer.
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
Why this behavior?
Indeed, in this case there is no need to cast to double.
How can I avoid this error?[/code]
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]