The method our book uses is shown in an illustration on page 490. But using DataSet as pictured isn't the only way to do it. Another way to look at it might be like the left side path in the illustration above. To give you an alternative, let's take a detailed look at another way to use OleDBConnection, the DataReader.
The OleDbDataReader is a more streamlined way to access data. OleDbDataReader is a read-only, forward-only way to get data from a database. This makes it more limited, but faster.
Although we won't take advantage of this here, DataReader can also improve performance by retrieving data as soon as it is available, rather than waiting for the entire result of the query to be returned in a DataSet. Microsoft notes that, "Results are returned as the query executes, and are stored in the network buffer on the client until you request them." Things like this can be critical in using large databases.
In this example application, we don't use automated dialogs to build the application. We do it in code! For our example, the database is then stored in a series of arrays. This allows random access to the data after the connection is closed to the database and eliminates the "forward-only" limitation of OleDbDataReader.
Although we could be using MSDE, this example is also coded using Access like the one in the book. Our very simple Access database was constructed containing data about recent About Visual Basic Spotlight articles.


