Solved

Connecting with .mdb

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now