Click here to Skip to main content
15,900,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do i get list of tables in access database
lets consider Sample.mdb is database and it has tables A,B,C
I want to retrive A,B,C in ListView
Posted

1 solution

Use the code below:

VB
Dim sConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Sample.mdb"
Dim olecon As New OleDbConnection(sConn)
olecon.Open()
Dim dt As DataTable = olecon.GetSchema("tables")
olecon.Close()
GridView1.DataSource = dt
GridView1.DataBind()
 
Share this answer
 
Comments
Maciej Los 31-May-11 15:44pm    
Do you want to view data from 3 tables in 1 ListView or do you want to view names of tables in 1 ListView?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900