databaseManager.getFoundsetCount returning wrong values

Hello,

I have the frequent problem that databaseManager.getFoundsetCount returns the wrong amount of records when using my own SQL to fill the foundset.

I have the impression that this is related to the usage of DISTINCT. So it looks that if I do something like

SELECT distinct(pk) FROM table WHERE ... complicated clause

databaseManager.getFoundsetCount will return an amount as if I issued

SELECT pk FROM table WHERE ... complicated clause

So the count is always bigger, which is a problem when I use this in a loop.

Thanks
Patrick

you could count the dataset also, instead of the foundset