[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Passing Access PW from VB5

Posted on 1998-08-31
5
Medium Priority
?
244 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
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

830 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