You can use a SELECT statement to retrieve records from the database via a
SELECT command. To execute a
SELECT statement you must:
•
|
Create an EDBCommand object that represents the SELECT statement.
|
•
|
Loop through the EDBDataReader displaying the results or binding the EDBDataReader to some control.
|
An EDBDataReader object represents a forward-only and read-only stream of database records, presented one record at a time. To view a subsequent record in the stream, you must call the
Read() method of the
EDBDataReader object.
4.
|
Executes the EDBCommand by calling the ExecuteReader method of the EDBCommand object.
|
The Read() method advances to the next record (if a record exists) and returns
true if a record exists, or
false to indicate that the
EDBDataReader has reached the end of the result set.
http://localhost/selectEmployees.aspx.