Hi,
i am using MyDAC 3.55.0.26 with Delphi 7. I utilize TMyQuery's Addwhere procedure to support runtime queries. The proplem is that when i have a sentence like the above:
SELECT *
FROM conctact
WHERE (contact.bActive = TRUE)
LIMIT 1000
and add a new where clause with Addwhere like the one:
AddWhere('(strSurName = 'MATOWN')')
the SQL sentence goes like this
SELECT *
FROM conctact
WHERE ((contact.bActive = TRUE)
LIMIT 1000) AND (strSurName = 'MATOWN')
which of course is wrong.
Can anyone tell if the problem exists, and if so, is there any shortcut for this, or should we wait for a new release.
Regards,
Athanasios Alekizoglou
TMyQuery Addwhere with a LIMIT sentence
-
a.alekizoglou
- Posts: 32
- Joined: Fri 22 Sep 2006 08:32
OK,
it seems the problem is that i have a macro for adding the LIMIT xxx sentence where the macro is the entire sentence:
SELECT *
FROM conctact
WHERE (contact.bActive = TRUE)
&customlimit
So if i change this to
SELECT *
FROM conctact
WHERE (contact.bActive = TRUE)
LIMIT &customlimit
then the AddWhere works fine.
it seems the problem is that i have a macro for adding the LIMIT xxx sentence where the macro is the entire sentence:
SELECT *
FROM conctact
WHERE (contact.bActive = TRUE)
&customlimit
So if i change this to
SELECT *
FROM conctact
WHERE (contact.bActive = TRUE)
LIMIT &customlimit
then the AddWhere works fine.