qadeer37
Well-known member
"Provider = Mircrosoft.Jet.OLEDB.4.0;" is not registered on the local machine?
Imports db = System.Data
Public Class Form1
Private Sub btnConnection_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnection.Click
Dim sConnection As String
Dim dbConn As db.OleDb.OleDbConnection
Try
sConnection = "Provider = Mircrosoft.Jet.OLEDB.4.0;" & "Data Source= Customer.accdb"
dbConn = New db.OleDb.OleDbConnection(sConnection)
dbConn.Open()
MessageBox.Show(dbConn.State.ToString())
Catch ex As Exception
Dim msg As String = String.Format("{0} Threw exception: {1}", ex.Source, ex.Message)
MessageBox.Show(msg)
End Try
End Sub
End Class
it is giving this exception.... "Provider = Mircrosoft.Jet.OLEDB.4.0;" is not registered on the local machine.
I am trying to make connection to an access file. I have Microsoft visual basic 2008 express edition and access 2007.

Imports db = System.Data
Public Class Form1
Private Sub btnConnection_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnection.Click
Dim sConnection As String
Dim dbConn As db.OleDb.OleDbConnection
Try
sConnection = "Provider = Mircrosoft.Jet.OLEDB.4.0;" & "Data Source= Customer.accdb"
dbConn = New db.OleDb.OleDbConnection(sConnection)
dbConn.Open()
MessageBox.Show(dbConn.State.ToString())
Catch ex As Exception
Dim msg As String = String.Format("{0} Threw exception: {1}", ex.Source, ex.Message)
MessageBox.Show(msg)
End Try
End Sub
End Class
it is giving this exception.... "Provider = Mircrosoft.Jet.OLEDB.4.0;" is not registered on the local machine.
I am trying to make connection to an access file. I have Microsoft visual basic 2008 express edition and access 2007.