UniQuery.Filter.Error.

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rdama
Posts: 1
Joined: Thu 02 Sep 2010 03:23

UniQuery.Filter.Error.

Post by rdama » Thu 02 Sep 2010 03:52

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]

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 02 Sep 2010 12:34

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next UniDAC build.

Post Reply