Solved

Connecting with .mdb

Posted on 2004-08-09
3
166 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

772 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

11 Experts available now in Live!

Get 1:1 Help Now