Here's the same statement using a typed accessor method. (The value 2 indicates that the field is in the second zero based ordinal reference of the column. Or, in other words, it's the third field.)
~~~~~~~~~~~~~~~~~~~~~~~~~
dteAboutVBDate(I) = odtrAboutVBDataReader.GetDateTime(2)
~~~~~~~~~~~~~~~~~~~~~~~~~
The downloadable source code has statements for both methods so you can try both on your own (one set is commented out).
Finally, the DataReader and the Connection are both closed.
~~~~~~~~~~~~~~~~~~~~~~~~~
odtrAboutVBDataReader.Close() ocmdAboutVBCommand.Connection.Close()
~~~~~~~~~~~~~~~~~~~~~~~~~
.NET is pretty forgiving if you forget (and you see lots of examples - even in books! - where a "close" isn't done) but Microsoft "officially" recommends it:
While a DataReader is open, the Connection is in use exclusively by that DataReader. You will not be able to execute any commands for the Connection, including creating another DataReader, until the original DataReader is closed.
The rest of the Form Load subroutine is simple housekeeping. The arrays are resized to minimize memory use and the top item in the ListBox is selected. Once this is done, an event subroutine to change the Text properties of the Label components is simple and straightforward.


