open access95 mdb in vb.net

  • Thread starter Thread starter Chris Thunell
  • Start date Start date
C

Chris Thunell

I need to open an access95 mdb file (read only) and get some data out of it
using vb.net. Any suggestions?
 
Hi,

From your other message it looks like you are using a combination of
code and the oledb controls. That might be the problem. Here is how to
open an access database with code. Replace northwind.mdb with the path to
you database.

Dim ds As New DataSet

Dim strConn As String

Dim strSQL As String

Dim da, daEmployees As OleDbDataAdapter

Dim conn As OleDbConnection

strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"

strConn &= "Data Source = Northwind.mdb;"

conn = New OleDbConnection(strConn)

da = New OleDbDataAdapter("Select * From Categories", conn)

da.Fill(ds, "Categories")



Ken
 
Try connecting to it in server explorer, then use the wizard, very simple.
But in my usage it uses ADO.net and to my knowledge only the Jet 4.0 engine
is available on the Access side(what version of the Jet engine is your copy
of the DB?). Just open it in Access 2003 and convert it when saving it, but
then older apps can't read or write to it. Other than that you could try
one of MS Office viewers available from the office update site as an
optional download, you might be able to get a data adapter to fill a set
with it.........hope this helps.

~Charlie
 
Back
Top