Page 1 of 1

UniQuery.Filter.Error.

Posted: Thu 02 Sep 2010 03:52
by rdama
Hi.
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;
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

Code: Select all

DM.MonQuery.Filtered:=true;
Why this behavior?
Indeed, in this case there is no need to cast to double.
How can I avoid this error?[/code]

Posted: Thu 02 Sep 2010 12:34
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next UniDAC build.