After hours of searching, I still can't seem to find a solution.

What I need to do is read a .mdb file into seperate listboxes.
The database file has seperate tables within it, all containing a column of data in each table.
If anyone could point me in the right direction in how this can be done or any snippets/examples it would be highly appreciated.

Many Thanks.

What part are you having a problem with reading the database? Or populating the listbox control? Post what code you have so far, where does it fall over?

What part are you having a problem with reading the database? Or populating the listbox control? Post what code you have so far, where does it fall over?

Hi, This is the code i got so far:

 Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        Dim con As New OleDb.OleDbConnection
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.mdb;"
        Dim dafacture As New OleDb.OleDbDataAdapter("select * from Emails", con)
        Dim ds As New DataSet()
        dafacture.Fill(ds, "Emails")

        ListBox1.DataSource = ds.Tables("Emails")

End Sub

This then populates the listbox with the following:

System.Data.DataRowView
System.Data.DataRowView
System.Data.DataRowView
System.Data.DataRowView
System.Data.DataRowView
System.Data.DataRowView
System.Data.DataRowView
System.Data.DataRowView
System.Data.DataRowView
System.Data.DataRowView

etc...

This article has been dead for over six months. Start a new discussion instead.