Usa oledb..
codice:
Dim sDBPath As String = "c:\example.mdb"
Dim sUser As String = "admin"
Dim sPassword As String = ""
Dim sTable As String = "MyTable"
Dim con As OleDb.OleDbConnection
Dim cmd As OleDb.OleDbCommand
' Create an OLEDB connection to the Access Database
con = New OleDb.OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & sDBPath & ";" & _
"User Id=" & sUser & ";" & _
"Password=" & spassword & ";")
' Open the connection
con.Open()
' Create a Command object to get all data from the table
cmd = New OleDb.OleDbCommand("SELECT * FROM [" & sTable & "]", con)
' Execute the command returning a Data Reader
Dim reader As OleDb.OleDbDataReader = cmd.ExecuteReader()
' Enuermate all the rows of data in the table
While reader.Read()
' Display the contents of the first column
Console.WriteLine(reader.GetString(0))
End While
' Close the reader
reader.Close()
' Close the connection
con.Close()
End Sub