Friday, October 12, 2007

Sample Codes: Data Access (2)

This sample improves the previous one by delegating all data access functions to a separate class named DBHelper. This also implements row filtering using the DefaultView property of a DataTable.

Download Code

This sample uses an MS Access database for persistent storage and adds reporting capabilities. This uses a different approach to retrieving and updating data by extending the DataSet class.

Download Code

To run both applications, set the ConnectionString value of the App.config file to the correct path of the databases. For the second example, Crystal Studio should be installed.