Solved

Connecting with .mdb

Posted on 2004-08-09
3
169 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
  • 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 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