System.Data.Odbc.OdbcCommand.ExecuteReader Method

Sends the OdbcCommand.CommandText to the OdbcCommand.Connection and builds an System.Data.Odbc.OdbcDataReader.

Syntax

public OdbcDataReader ExecuteReader ()

Returns

An System.Data.Odbc.OdbcDataReader object.

Remarks

You should set the OdbcCommand.CommandText property to the full ODBC call syntax for stored procedures. The command executes this stored procedure when you call OdbcCommand.ExecuteReader.

While the System.Data.Odbc.OdbcDataReader is used, the associated System.Data.Odbc.OdbcConnection is busy serving the System.Data.Odbc.OdbcDataReader. While in this state, no other operations can be performed on the System.Data.Odbc.OdbcConnection other than closing it. This is the case until the OdbcDataReader.Close method of the System.Data.Odbc.OdbcDataReader is called.

Requirements

Namespace: System.Data.Odbc
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0
Since: .NET 2.0