I am using Visual Web Developer and trying to connect to an Access data base in the code behind page Default.aspx.vb. I can't connect to my data base with the following code:
Dim connectionstring As String
connectionstring = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\asp\test02\App_Data\company.mdb;User Id=admin;Password=;"
Dim myConn As OdbcConnection = New OdbcConnection(connectionstring)
myConn.Open()
I alwasy get : "Data Source not found and no default driver found:. Does anyone know what I am doing wrong ??
![]() |
0 |
![]() |
Check out http://www.connectionstrings.com/. Drill down into Access and you will see sample conection strings for ODBC connections. Is there a specific reason you want to use ODBC? OleDb is a better choice (and that is the format of the connection string you have provided).
Terri Morton
Engagement Manager, Neudesic
How to ask a question
![]() |
0 |
![]() |