SQL Error #42000 on MyDAC 4 - OK on MyDAC 3.55

SQL Error #42000 on MyDAC 4 - OK on MyDAC 3.55

Postby TomS » Tue 02 Aug 2005 07:35

In version 4, I'm getting the following error when trying to set a filter programmatically (The filter works fine when set manually in Design mode):

#42000You have an error in your SQL syntax; check the manual that corresponds to you MySQL server version for the right syntax to use near 'WHERE varer.ID = 123' at line 1.


The filter-setting code is:

Code: Select all
DM.qryVarer.FilterSQL := 'varer.ID=123';
DM.qryVarer.Filtered := True;
DM.qryVarer.Active := True;


The SQL statement is:

Code: Select all
SELECT varer.*, artister.ARTIST, varegrupper.FARGE, varegrupper.MVARATE
FROM varer
LEFT OUTER JOIN artister ON (varer.ARTIST_ID=artister.ID)
LEFT OUTER JOIN varegrupper ON (varer.VAREGRUPPE_ID=varegrupper.ID)
ORDER BY artister.ARTIST, varer.TITTEL;


This works fine in 3.55. What am I missing here?
TomS
 
Posts: 3
Joined: Tue 02 Aug 2005 07:24

Bug in 4.0

Postby Hans » Tue 02 Aug 2005 09:40

I don't think you are missing anything.
It looks as if the sortclausule is put prior to the whereclausule, which leads to errors.
Hans
 

Postby Ikar » Tue 02 Aug 2005 10:44

Fixed. We will try to make this fix available at current week.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby TomS » Tue 02 Aug 2005 11:33

Thanks for your prompt reply. I'll stand by for the fix... :-)

Tom
TomS
 
Posts: 3
Joined: Tue 02 Aug 2005 07:24

Postby el_ade » Thu 04 Aug 2005 20:06

I have the same problem, I have purchaded the mydac 4.0 and on recompiling of my application occurs the same problem.

Isn´t still available the fix?
el_ade
 
Posts: 10
Joined: Fri 08 Apr 2005 03:09
Location: Cancun

Postby Ikar » Fri 05 Aug 2005 08:26

New build was released and you can download it (4.00.0.2) now from Core Lab server.
Please see details http://crlab.com/forums/viewtopic.php?t=1724
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby TomS » Fri 05 Aug 2005 15:45

Lookin' good, guys. Lookin' REAL good.

Thanks.
:D :D :D
TomS
 
Posts: 3
Joined: Tue 02 Aug 2005 07:24


Return to MySQL Data Access Components