Connecting to an access database using VB.net coding.
Hi folks i am practicing connecting to a database using code. I am not having much success.
The code i am using:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Using the connection object
Dim connNorthwind As New OleDb.OleDbConnection
connNorthwind.ConnectionString = "provider=microsoft.jet.oledb.4.0" & "data source=g:\my document\northwind.mdb"
connNorthwind.Open()
connNorthwind.Close()
End Sub
However i this message when i when i click on start.
An unhandled exception of type 'System.invalidoperation'
occurred in system.data.dll.
Additional information:the microsoft.jet.oledb.4.0 data source=g:\mydocument\northwind.mdb' provider in not registered on the local machine.
Could you tell me what all that is about?
How can i cure it?
Do you have code that i can use to connect to an access database.
Thank you all in advance
nigel
| IP: Logged
Posts: 4