Solved

Set MDB password and use it

Posted on 2000-04-06
7
188 Views
Last Modified: 2010-05-02
I set the MDB password in Office97 Access:
Menu Tools-> Security->set database password-> and then input password OK.

In vb6, Menu->Project-->More ActiveX
Designer ->Data Enviroment
and then:
   Dataenviroment1
     connection1
I set the property of connection1,
the provider is Microsoft Jet 4.0
OLE DB Provider.
And next is input the database name,
and user name password.
After I input the user name and password,
I click the buttom of TEST CONNECTION,
it run error.  
why ?

Please give me detail answer.

Thanks  
0
Comment
Question by:hxb
  • 4
  • 2
7 Comments
 

Accepted Solution

by:
kojot earned 200 total points
ID: 2692402
Open the database in RUNTIME ONLY! However, if you want to open it for administration or design time you must use ODBC resources provided by Windows. Visual Basic can connect to the password protected database only if ODBC is properly configured.

Hope that helped!

Igor.
0
 

Author Comment

by:hxb
ID: 2692632
Thank for your help.
I have tried it, build a ODBC and
it is OK.

That means in administration or design time, I must use ODBC resources.
And then in running time,
I should change the provider string
and use Microsoft Jet 4.0
OLE DB Provider.

Is it?
0
 

Author Comment

by:hxb
ID: 2693295
I have some problem in running time,
because I do not know how to
set the provider and password
that using Microsoft Jet 4.0 OLE DB
Provider.
0
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.

 
LVL 69

Expert Comment

by:Éric Moreau
ID: 2694437
In the Connection tab, don't set User Name and password (leave them as they are).

After setting the database name, goto the ALL tab, select "Jet OLEDB: Database password", click on "edit Value" and enter your password.
0
 

Author Comment

by:hxb
ID: 2698850
Thank you very much.
0
 

Author Comment

by:hxb
ID: 2698853
Thanks kojot and emoreau.
0
 

Expert Comment

by:kojot
ID: 2699632
No problem! Mail if you need any more help.
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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

911 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

21 Experts available now in Live!

Get 1:1 Help Now