RSS

Get number of records in a FormDataSource

24 Nov

SysQuery::getTotal works fine, but the trick is how to handle temporary data sources where getTotal does not work:

if(!formDataSource.curser().isTmp())
{
recordCount = SysQuery::getTotal(formDataSource.queryRun());
}
else
{
while(!formDataSource.allRowsLoaded())
{
formDataSource.getNext();
}
recordCount = formDataSource.numberOfRowsLoaded();
}

Advertisements
 
Leave a comment

Posted by on November 24, 2013 in Development

 

Tags: , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: