954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

connect to password protected access db

hi every
am anew guy in all this stuf
however i want to connect to an access 97 data base with a password
through visual basic 6 however each time i try to connect it give me an error
i put in the correct username and password

can some one help me on how i can connect to this please

Tomex

tomex
Newbie Poster
1 post since Sep 2003
Reputation Points: 10
Solved Threads: 0
 

Hi tomex,

A couple of questions:

1) Are you using ADO or DAO to connect to this database?

2) What string are using to connect to the database.

Also, some very excellent code on this subject may be found at http://www.freevbcode.com

phickman7872
Newbie Poster
6 posts since Oct 2003
Reputation Points: 10
Solved Threads: 0
 

Try This ..


Dim DB As Database

Set DB = OpenDatabase("\\Server1\GST\Payroll\PayrollDB.mdb", False, False, ";PWD=IIT")

Here "\\Server1\GST\Payroll\PayrollDB.mdb" is the DB location..

and under project referance u should select "Microsoft DAO 2.5/3.0 compatible Library"

Cheers
Bass

dimuthubas
Newbie Poster
4 posts since Feb 2005
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You