quering the query

Can anyone please tell me if it is possible to get the number of records that were selected by a query? I would like to use this number in setTotal() call to my SysOperationProgress window.

Hi, You can use something like this: query q = new query(QueryStr(MBSQuery1)); QueryRun qr = new QueryRun(q); ; print SysQuery::countTotal(qr); pause; Regards, Ciprian

a little comment: if your query has more than one datasource, the countTotal won’t give the correct result. in this case you should use the countLoops() method

Thanks guys. That’s exactly what i was looking for!