QueryRun.getNo Method
Retrieves the record fetched by the previous call to QueryRun.next Method.
Syntax
public Common getNo(int dataSourceNo)
Run On
Called
Parameters
- dataSourceNo
Type: int
The number of the data source from which to get the currently selected record.
Return Value
Type: Common Table
Returns the record fetched for the data source identified by the argument.
Remarks
The data source from which to retrieve the record is specified by the number of the data source. The data sources are counted consecutively, starting from 1. The QueryRun.get Method method can be used instead; that method is supplied with the table (and an optional parameter), that defines the data source.
Examples
{
QueryRun qr;
// Consider a query with CustTable/CustTrans datasources.
// Traverse all records found in CustTable/CustTrans:
while (qr.next())
{
if (qr.Changed(TableNum(CustTable)))
{
// A new CustTable record
CustTableRecord = qr.GetNo(1);
}
if (qr.Changed(TableNum(CustTrans)))
{
// A new CustTrans record
CustTransRecord = qr.GetNo(1);
}
}
}