QueryRecCount
Posted: Thu 03 Sep 2009 14:40
Hello,
1. According to the "TMSDataSetOptions.QueryRecCount Property" topic in help, QueryRecCount should work with these options:
FetchAll=True
NonBlocking=True
But it does not. It only works with FetchAll=False.
Did I misunderstood something?
2. Like QueryRecCount, we want to execute a query before opening the dataset to find some aggregates.
E.g: SELECT SUM(COL1), SUM(COL2), MIN(COL3) FROM (MSQuery.BaseSQL) AS T1
I think QueryRecCount runs a similar SQL:
SELECT COUNT(*) FROM (MSQuery.BaseSQL) AS T1
We want to execute a single SQL and get all the results in a single run: SELECT COUNT(*), SUM(COL1).....
Is there a way to set the RecordCount property manually like QueryRecCount does?
Or is it possible to implement a custom TMSQuery to modify the QueryRecCount's SQL text and behavior?
3. With FetchAll=False and QueryRecCount=True,
how can we find the number of fetched rows so far?
Thanks.
1. According to the "TMSDataSetOptions.QueryRecCount Property" topic in help, QueryRecCount should work with these options:
FetchAll=True
NonBlocking=True
But it does not. It only works with FetchAll=False.
Did I misunderstood something?
2. Like QueryRecCount, we want to execute a query before opening the dataset to find some aggregates.
E.g: SELECT SUM(COL1), SUM(COL2), MIN(COL3) FROM (MSQuery.BaseSQL) AS T1
I think QueryRecCount runs a similar SQL:
SELECT COUNT(*) FROM (MSQuery.BaseSQL) AS T1
We want to execute a single SQL and get all the results in a single run: SELECT COUNT(*), SUM(COL1).....
Is there a way to set the RecordCount property manually like QueryRecCount does?
Or is it possible to implement a custom TMSQuery to modify the QueryRecCount's SQL text and behavior?
3. With FetchAll=False and QueryRecCount=True,
how can we find the number of fetched rows so far?
Thanks.