21.01.2004, 20:51 | #21 |
Участник
|
итак, предлагаю код метода SysQuery::countPrim для 3.0
Код: private server static container countPrim(container _queryPack) { ... ; countQueryRun = new QueryRun(_queryPack); countQuery = countQueryRun.query(); for (k = 1; k <= countQuery.dataSourceCount();k++) { qbds = countQuery.dataSourceNo(k); qbds.update(false); //qbds.sortClear(); // Вот этот метод сильно мешал! qbfl = qbds.fields(); qbfl.dynamic(false); qbfl.clearFieldList(); qbfl.addField(FieldNum(Common,recId),SelectionField::COUNT); } countQueryRun = new QueryRun(countQuery); while (countQueryRun.next()) { common = countQueryRun.getNo(1); counter += common.recId; loops++; } return [counter,((loops > 1)? loops : counter)]; } |
|