If you want to interact with databases then you're going to have to learn some SQL for a start. Then it's a matter of creating an OleDbDataAdapter and calling its Fill method or creating an OleDbCommand and calling its ExecuteReader command. There are links to tutorials on SQL and ADO.NET in my signature. As an example, to get all the data from a table in your database above you could do this:Note also that if you only want to execute one Fill method you don't need to explicitly Open the connection, but if you do so then you need to explicitly Close again.VB Code:
Dim myTable As New DataTable Dim myAdapater As New OleDb.OleDbDataAdapter("SELECT * FROM MyTable", connection) myAdapter.Fill(myTable) connection.Close()




Reply With Quote