after i define

con.ConnectionString = dbprovider & dbsource

con.open()

leads to error
The '.NET Framework Data Provider for OLE DB Data Source = C:\Users.... \Database1.mdb' provider is not registered on the local machine.

i have access and .net framework installed

Recommended Answers

Please post the values of dbprovider & dbsource. Examples for connecting to Access via OleDb can be found here

Jump to Post

All 3 Replies

Please post the values of dbprovider & dbsource. Examples for connecting to Access via OleDb can be found here

dbprovider=".NET Framework Data Provider for OLE DB"
dbsource="C:\Users\Spyros\Documents\Visual Studio 2010\Projects\myoffice0\myoffice0\myoffice0\Database1.mdb"

Try

dbsource = "C:\Users\Spyros\Documents\Visual Studio 2010\Projects\myoffice0\myoffice0\myoffice0\Database1.mdb"
Dim con As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbfile & ";User Id=admin;Password=;")
con.open()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.