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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top