Problem with ordered Queries and Midas
Posted: Fri 07 Nov 2008 10:33
Hi,
I have found a bug when I use a TIBCQuery with TDataSetProvider and TClientDataSet.
I only get 1 or some (1-5) rows from over 20000 when I use the following type of SQL:
SELECT
A.ID,
A.NAME1,
B.NAME2
FROM A, B
WHERE A.ID = B.ID
ODER BY A.ID, A.NAME1, B.NAME2
I played with the SQL and i can say:
- it has to do with the ORDER BY - when removed I get all rows
- If I change the SQL like that:
SELECT
A.ID AS ID_TEST,
A.NAME1 AS NAME1_TEST,
B.NAME2 AS NAME2_TEST
FROM A, B
WHERE A.ID = B.ID
ODER BY A.ID, A.NAME1, B.NAME2
then it works, i get all rows.
The problem seems to be the same name in SELECT and ORDER BY.
Let me note that your query delivers all rows, but the provider can't fetch all rows.
Other Query components (like BDE, dbexpress etc) work without a problem for such queries.
Thanks in advance.
I have found a bug when I use a TIBCQuery with TDataSetProvider and TClientDataSet.
I only get 1 or some (1-5) rows from over 20000 when I use the following type of SQL:
SELECT
A.ID,
A.NAME1,
B.NAME2
FROM A, B
WHERE A.ID = B.ID
ODER BY A.ID, A.NAME1, B.NAME2
I played with the SQL and i can say:
- it has to do with the ORDER BY - when removed I get all rows
- If I change the SQL like that:
SELECT
A.ID AS ID_TEST,
A.NAME1 AS NAME1_TEST,
B.NAME2 AS NAME2_TEST
FROM A, B
WHERE A.ID = B.ID
ODER BY A.ID, A.NAME1, B.NAME2
then it works, i get all rows.
The problem seems to be the same name in SELECT and ORDER BY.
Let me note that your query delivers all rows, but the provider can't fetch all rows.
Other Query components (like BDE, dbexpress etc) work without a problem for such queries.
Thanks in advance.