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

SQL Anywhere 10.0.1 » UltraLite - .NET Programming » UltraLite .NET 1.0 API Reference

SetDatabaseOption method Next Page

ULDataReader class


Represents a read-only bi-directional cursor in an UltraLite database. Cursors are sets of rows from either a table or the result set from a query.

Syntax

Visual Basic

Public Class ULDataReader
Inherits MarshalByRefObject

C#

public class ULDataReader :
MarshalByRefobject

Remarks

There is no constructor for ULDataReader. To get a ULDataReader object, execute a ULCommand:

' Visual Basic
Dim cmd As ULCommand = new ULCommand( _
    "SELECT emp_id FROM employee FOR READ ONLY", conn _
  )
Dim reader As ULDataReader = cmd.ExecuteReader()

// C#
ULCommand cmd = new ULCommand(
    "SELECT emp_id FROM employee FOR READ ONLY", conn
  );
ULDataReader reader = cmd.ExecuteReader();

UL Ext.: The ADO.NET standard only requires forward-only motion through the result set, but ULDataReader is bi-directional. ULDataReader's Move methods provide you with full flexibility when moving through results.

ULDataReader is a read-only result set. If you need a more flexible object to manipulate results, use a ULCommand.ExecuteResultSet(), ULCommand.ExecuteTable(), or a ULDataAdapter. ULDataReader retrieves rows as needed, whereas ULDataAdapter must retrieve all rows of a result set before you can carry out any action on the object. For large result sets, this difference gives the ULDataReader a much faster response time.

UL Ext.: All columns of a ULDataReader may be retrieved using GetString.

Implements: System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable

See also

ULDataReader members
Depth property
FieldCount property
IsBOF property
IsClosed property
IsEOF property
Item property
Item property
RecordsAffected property
RowCount property
Schema property
Close method
Dispose method
Finalize method
GetBoolean method
GetByte method
GetBytes method
GetBytes method
GetChar method
GetChars method
GetData method
GetDataTypeName method
GetDateTime method
GetDecimal method
GetDouble method
GetFieldType method
GetFloat method
GetGuid method
GetInt16 method
GetInt32 method
GetInt64 method
GetName method
GetOrdinal method
GetSchemaTable method
GetString method
GetTimeSpan method
GetUInt16 method
GetUInt32 method
GetUInt64 method
GetValue method
GetValues method
IsDBNull method
MoveAfterLast method
MoveBeforeFirst method
MoveFirst method
MoveLast method
MoveNext method
MovePrevious method
MoveRelative method
NextResult method
Read method