แชร์ผ่าน


QueryRun.getNo(Int32) Method

Definition

Retrieves the record fetched by the previous call to QueryRun.next Method.

public:
 virtual Microsoft::Dynamics::Ax::Xpp::Common ^ getNo(int _dataSourceNo);
public virtual Microsoft.Dynamics.Ax.Xpp.Common getNo (int _dataSourceNo);
abstract member getNo : int -> Microsoft.Dynamics.Ax.Xpp.Common
override this.getNo : int -> Microsoft.Dynamics.Ax.Xpp.Common
Public Overridable Function getNo (_dataSourceNo As Integer) As Common

Parameters

_dataSourceNo
Int32

The number of the data source from which to get the currently selected record.

Returns

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.

The following example demonstrates the GetNo method.

{ 
    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); 
        } 
    } 
}

Applies to