connection string for Access database in .net

May 20, 2008 at 5:51 am Leave a comment

MS Access ODBC connection strings

Standard Security:
“Driver={MicrosoftAccessDriver(*.mdb)};
DBQ=C:\App1\Your_Database_Name.mdb;
Uid=Your_Username;Pwd=Your_Password;”

Workgroup:
“Driver={Microsoft Access Driver (*.mdb)};
Dbq=C:\App1\Your_Database_Name.mdb; SystemDB=C:\App1\Your_Database_Name.mdw;”

Exclusive:
“Driver={Microsoft Access Driver (*.mdb)};
DBQ=C:\App1\Your_Database_Name.mdb;Exclusive=1;Uid=Your_Username; Pwd=Your_Password;”

MS Access OLE DB & OleDbConnection (.NET framework) connection strings
Open connection to Access database:

“Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\App1\Your_Database_Name.mdb; User Id=admin; Password=”

Open connection to Access database using Workgroup (System database):
“Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\App1\Your_Database_Name.mdb; Jet OLEDB:System
Database=c:\App1\Your_System_Database_Name.mdw”

Open connection to password protected Access database:
“Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\App1\Your_Database_Name.mdb; Jet OLEDB:Database Password=Your_Password”

Open connection to Access database located on a network share:
“Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=\\Server_Name\Share_Name\Share_Path\Your_Database_Name.mdb”

Open connection to Access database located on a remote server:
“Provider=MS Remote; Remote Server=http://Your-Remote-Server-IP; Remote
Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=c:\App1\Your_Database_Name.mdb”

About these ads

Entry filed under: ASP.Net, C#. Tags: .

Play Video Files in your Site connection string for MS SQL Server database in .net

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Blog Stats

  • 29,473 hits
May 2008
M T W T F S S
« Mar   Sep »
 1234
567891011
12131415161718
19202122232425
262728293031  

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: