Tag Archives: OLE DB

Initialize lists from databases without binding in C#

Note that this is a very manual way to initialize lists. Often you can display data more easily by using data binding. In this example, I added the Access database file Books.mdb to the project and set its “Copy to … Continue reading

Posted in controls, database, lists, user interface | Tagged , , , , , , , , , , , , | 1 Comment

Generate random data in an Access database in C#

This example shows how you can generate random data for students and their test scores in an Access database. I often build examples that manipulate databases. Those examples are more interesting if the database holds lots of data, but it’s … Continue reading

Posted in ADO.NET, algorithms, database | Tagged , , , , , , , , , , , , , , | Leave a comment

Bind a DataGrid to a DataSet holding multiple tables at runtime in C#

This example shows how you can bind a DataGrid control to a DataSet loaded from an MDB file at runtime. When the form loads, the following code builds the DataSet and binds it to the form’s DataGrid control. // The … Continue reading

Posted in controls, database | Tagged , , , , , , , , , , | 11 Comments