Executes the SQL query in the sql parameter against the database. Use this method when the sql query returns a result set (e.g., SELECT or some stored procs). Otherwise, use ExecuteNonQuery(CommandType, String).

Namespace:  Asi.iBO
Assembly:  Asi.iBO (in Asi.iBO.dll) Version: 15.1.2.0

Syntax

C#
public SqlDataReader ExecuteReader(
	CommandType commandType,
	string sql
)
Visual Basic (Declaration)
Public Function ExecuteReader ( _
	commandType As CommandType, _
	sql As String _
) As SqlDataReader
Visual C++
public:
SqlDataReader^ ExecuteReader(
	CommandType commandType, 
	String^ sql
)

Parameters

commandType
Type: System.Data..::.CommandType
The type of cammand contained in the sql parameter.
sql
Type: System..::.String
The SQL command to execute

Return Value

A SqlDataReader containing the results of the SQL statement

See Also