What is the correct conection string for MSaccess?

  • Thread starter Thread starter dtto086
  • Start date Start date
D

dtto086

Hi.


What is the correct connection string, for Msaccess Databases in Ado.Net?

The Databases have Password, and locate in my PC.

Thanks for all
 
Imports System.Data.OleDb
....
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\myPath\myJet.mdb;" & _
"User ID=Admin;" & _
"Password="
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()

Take a look at Carl Prothman's site; "World's largest collection of ADO and
ADO.NET connection strings on the internet!":
http://www.carlprothman.net/Default.aspx?tabid=81

HTH,
-B
 
Thanks for all

andres
Beth Massi said:
Imports System.Data.OleDb
...
Dim oOleDbConnection As OleDbConnection
Dim sConnString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\myPath\myJet.mdb;" & _
"User ID=Admin;" & _
"Password="
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()

Take a look at Carl Prothman's site; "World's largest collection of ADO
and ADO.NET connection strings on the internet!":
http://www.carlprothman.net/Default.aspx?tabid=81

HTH,
-B
 
Back
Top