Page 1 of 1

FilterSQL in MyDAC 3.30 and 4.00.1.6

Posted: Fri 02 Dec 2005 14:01
by calix
Hello,

i´ve a problem with the TMyQuery.FilterSQL between MyDac 3.30 and 4.00.

Example:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  MyQuery1.Close;
  MyQuery1.SQL.Text:='select AZ1, AZ2, AZ3, Land from adress WHERE Land=''GB'' ORDER BY AZ1';
  MyQuery1.open;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  MyQuery1.FilterSQL:='AZ1 like ''%bank%''';
end;
Button1-Click an Button2-Click will work fine in 3.30
At Button2-Click in 4.00 comes an SQL-Error with the following SQL-Code

Code: Select all

select AZ1, AZ2, AZ3, Land 
from adress 
WHERE AZ1 like '%bank%'
WHERE Land='GB'
ORDER BY AZ1
It seems that in 4.00 the existing WHERE-Conditions will not recognized.

Did you have a solution for the problem?

Best regards
Harald

Posted: Mon 05 Dec 2005 10:01
by Ikar
Please check MydacVersion constant value in your program. It seems like you use MyDAC 4.00.1.5.

Posted: Mon 05 Dec 2005 10:10
by calix
I´ve downloaded the latest version incl. sourcecode
MYDACVersion = '4.00.1.6';

Posted: Mon 05 Dec 2005 10:29
by Ikar
Please send us (mydac*crlab*com) a complete small sample to demonstrate it and include script to create and fill table.