Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access Connection & Password How?

Status
Not open for further replies.

Ginka

Programmer
Mar 18, 2005
54
MX
I have a DB in MS Access, I have set a password to avoid being open by the end user.

Access asked me to create a .MDE File, I did it.

But when I'm trying to test the connection it says something like if I missnig something in the connection string.

Could anybody tell me how a connection string should be using a Password?
 
This is what I use:

Code:
//Initialized elsewhere
string strPassword;
string strDatabaseFilename;

string strConnectionString =
   "Provider=Microsoft.Jet.OLEDB.4.0;" +
   "Data Source=" + strDatabaseFilename + ";" +
   "Jet OLEDB:Database Password=" + strPassword;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top