?
Solved

Passing Access PW from VB5

Posted on 1998-08-31
5
Medium Priority
?
232 Views
Last Modified: 2010-04-30
What property do I set in a VB5 data control to supply an Access database with a password (so I may get to the database fields)?

Thank you in advance.
0
Comment
Question by:tisd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
chewhoung earned 40 total points
ID: 1432051
There is no property to set password for Access db On VB5 data control. You need to disable the password on Access db to get in the fields. Once, you have done your coding(completely), set back your password onto Access db. To use your VB5 application on a secure Access db, you need to let user key in user id and password at entry of your VB5 application.
To verify user id and password in VB5, put the following code in your VB5 application logon screen:

   DBEngine.SystemDB = "C:\yoursystemmdw.mdw"

   'Create a new workspace object
   'gwWorkSpace is a Global variable where you put in the module
   'txtUserName and txtPassword are fields on Logon screen.
   '
   Set gwWorkSpace = DBEngine.CreateWorkspace("New", _
   Trim(txtUserName.Text), Trim(txtPassword.Text), dbUseJet)

0
 

Author Comment

by:tisd
ID: 1432052
Regarding   DBEngine.SystemDB = "C:\yoursystemmdw.mdw",

what is "C:\yoursystemmdw.mdw" ?

Thank you..
0
 
LVL 5

Expert Comment

by:chewhoung
ID: 1432053
For a protected Access db, you should have already created a system.mdw file(assuming you are using Access97, system.mda for Access 2.0).

For example:
you have a mdb call inventory.mdb in c:\inventory directory.
you should put your system.mdw in the same directory.
so, C:\yoursystemmdw.mdw = C:\inventory\system.mdw.
0
 

Author Comment

by:tisd
ID: 1432054
Dear Sir/Madam;

I have searched my entire disk for a .mdw or .mda file.  None exists.  How do I create this file so I may test the solution you have provided?

Thanks in advance.
0
 
LVL 5

Expert Comment

by:chewhoung
ID: 1432055
Couldn't find??
I thought your access database is secured??
You cannot secured an access database without a workgroup file.
By default, Access97 create a workgroup file under
windows->system directory.
Tell me something, when you double click your Access mdb file from explorer, did Access prompt you for password?
If it doesn't, your mdb file is not secured and you should be able to get the fields for tables in your VB5 application.

To create a new workgroup file:
I assumed you are using Access97 from Office97.
Go to the Office directory, look for a shortcut call MS Access WorkGroup Administrator or use explorer go to windows->system directory and run the file call WRKGADM.EXE.
Click Create button to create a new workgroup file (mdw) under your application's directory.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…
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…
Suggested Courses

752 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