FilterSQL in MyDAC 3.30 and 4.00.1.6

FilterSQL in MyDAC 3.30 and 4.00.1.6

Postby calix » Fri 02 Dec 2005 14:01

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
calix
 
Posts: 5
Joined: Fri 19 Nov 2004 04:54

Postby Ikar » Mon 05 Dec 2005 10:01

Please check MydacVersion constant value in your program. It seems like you use MyDAC 4.00.1.5.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby calix » Mon 05 Dec 2005 10:10

I´ve downloaded the latest version incl. sourcecode
MYDACVersion = '4.00.1.6';
calix
 
Posts: 5
Joined: Fri 19 Nov 2004 04:54

Postby Ikar » Mon 05 Dec 2005 10:29

Please send us (mydac*crlab*com) a complete small sample to demonstrate it and include script to create and fill table.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components