Solved

Connecting with .mdb

Posted on 2004-08-09
3
171 Views
Last Modified: 2010-05-02
My database is on access2000 , name of db: Pir.mdb
i was using the code:

 'MyCin=new connection

MyCin.Open "Provider=Microsoft.jet.oledb.4.0;data source =" & App.Path & "\Pir.mdb"

and it works fine, but when i set up a password on the database
i tried this code but it didnt work?!!

MyCin.Open "Provider=Microsoft.jet.oledb.4.0;data source =" & App.Path & "\Pir.mdb",,"mypassword"

Any suggestions ...

Thanks


0
Comment
Question by:Mahdi Mansour
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Sethi earned 50 total points
ID: 11751196
Set the password like this:

MyCin.Open "Provider=Microsoft.jet.oledb.4.0;data source =" & App.Path & "\Pir.mdb;Jet OLEDB:Database Password=mypassword"
0
 
LVL 18

Expert Comment

by:Sethi
ID: 11751201
For your future references look at the following two sites for correct connection string formats:

http://www.connectionstrings.com
http://www.able-consulting.com/ADO_Conn.htm
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11751311
A useful utility called Mz-Tools (http://www.mztools.com/) can creates a connection string for you and copies it to clipboard ;)

Darko
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question