Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere .NET 2.0 API reference » iAnywhere.Data.SQLAnywhere namespace (.NET 2.0) » SADataReader class

 

Read method

Reads the next row of the result set and moves the SADataReader to that row.

Syntax
Visual Basic

Public Overrides Function Read() As Boolean
C#

public override bool Read();
Return value

Returns true if there are more rows. Otherwise, it returns false.

Remarks

The default position of the SADataReader is prior to the first record. Therefore, you must call Read to begin accessing any data.

Example

The following code fills a listbox with the values in a single column of results.

while( reader.Read() )
{
    listResults.Items.Add(
        reader.GetValue( 0 ).ToString() );
}
listResults.EndUpdate();
reader.Close();
See also