Problem with joined tables
Posted: Mon 17 Jun 2013 15:06
I'm using the latest version of the driver (6.2.3) and I have a problem with the driver - this is on Windows 7 and Delphi XE3.
I'm doing a query with TSQLDataSet (or TSQLQuery same result) with a straight forward joined table. e.g. SELECT * FROM A INNER JOIN B ON A.ID = B.ID WHERE A.xxx = xxx AND B.yyy = yyy
However, I keep getting SQL error 107, basically complaining about my second table B prefix table. There's nothing wrong with that of course.
Diving a bit deeper I found it's because I'm trying to get a RecordCount from the result set. If I take this out it's fine. Tracing through it seems it's something to do with the way the record count is obtained. It generates a new query with COUNT(*) instead of * and it seems to be this that's causing the problem.
Of course, the record count is not crucial and I can code around that. Any ideas on whether this is a bug or not and if so where?
Thanks
Mark
I'm doing a query with TSQLDataSet (or TSQLQuery same result) with a straight forward joined table. e.g. SELECT * FROM A INNER JOIN B ON A.ID = B.ID WHERE A.xxx = xxx AND B.yyy = yyy
However, I keep getting SQL error 107, basically complaining about my second table B prefix table. There's nothing wrong with that of course.
Diving a bit deeper I found it's because I'm trying to get a RecordCount from the result set. If I take this out it's fine. Tracing through it seems it's something to do with the way the record count is obtained. It generates a new query with COUNT(*) instead of * and it seems to be this that's causing the problem.
Of course, the record count is not crucial and I can code around that. Any ideas on whether this is a bug or not and if so where?
Thanks
Mark