IDatasetInstance.Next

Syntax

Next;

Description

The Next method performs transition to the next record in the data source.

Example

Executing the example requires a table with the T_Data identifier in the repository with a field with the Value identifier. Add links to the Db and Metabase system assemblies.

Sub UserSample;
Var
    MB: IMetabase;
    DSInst: IDatasetInstance;
    Fields: IDatasetInstanceFields;
    Field: IDatasetInstanceField;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    DSInst := MB.ItemById("T_Data").Open(NullAs IDatasetInstance;
    Fields := DSInst.Fields;
    Field := Fields.FindById("Value");
    While Not DSInst.Eof Do
        i := i + 1;
        Debug.WriteLine("Number: " + i.ToString + "; Value: " + Field.Value);
        DSInst.Next;
    End While;
End Sub UserSample;

After executing the example, the "i" variable contains the number of data source records. The number of fields and values of the Value field are displayed in the console of the development environment.

See also:

IDatasetInstance