Data can be retrieved from a SQL Server CE database by using the SqlCeDataReader class. The SqlCeDataReader class provides fast, forward-only access to rows of data.
The steps to retrieve data by using the SqlCeDataReader are similar to the steps required to run the INSERT SQL command:
We create an instance of the SqlCeConnection. The SqlCeDataReader will use this connection to retrieve the requested data rows.
A SqlCeCommand object should be created with the appropriate SELECT statement.
Set the command's command type, and call the SqlCeCommand.ExecuteReader method.
The ExecuteReader method executes the command text against the database by using the SqlCeConnection. A SqlCeDataReader that will ...