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

Recommended Answers

All 2 Replies

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.