HELP: Access 2.0/VB3 db Security 
Author Message
 HELP: Access 2.0/VB3 db Security

There's probably a simple answer to this question, but it apparently is
beyond me.

How do I protect an MS Access 2.0 database being used in a VB3 app so
that
(1) user with Access on their workstations cannot open the database
unless they have a login name and password and,
(2) the application can pass a login or password to the database so the
app can alter the data?

I'd like to simply create two accounts for the database, one for outside
administrative access and one for the application.  Otherwise, a generic
user of Access should be barred from opening or modifying the database.

Help... please!


Thanks....
--

Pursuant to US Code, Title 47, Chapter 5, Subchapter II, Sec. 227,
any and all nonsolicited commercial E-mail sent to this address is
subject to a download and archival fee in the amount of $500 US.
E-mailing denotes acceptance of these terms.



Sat, 27 Nov 1999 03:00:00 GMT  
 HELP: Access 2.0/VB3 db Security


Quote:

> There's probably a simple answer to this question, but it apparently is
> beyond me.

> How do I protect an MS Access 2.0 database being used in a VB3 app so
> that
> (1) user with Access on their workstations cannot open the database
> unless they have a login name and password and,
> (2) the application can pass a login or password to the database so the
> app can alter the data?

> I'd like to simply create two accounts for the database, one for outside
> administrative access and one for the application.  Otherwise, a generic
> user of Access should be barred from opening or modifying the database.

There is not a simple answer to this question. ACCESS security
is quite flexible, and somewhat complex. Two references you
need:

A) Microsoft/Access/Service packs, download WX1051.EXE this
will decompress into a "whitepaper" and the Access 2.0 Security
Wizard Add-in. (Later versions of ACCESS had the wizard
built-in).

B).  http://www.wji.com/access/w7365.html has a more recent
security FAW document that was authored by several MVP's who
are regular contributors to this newsgroup.

Users of generic ACCESS all have the default user name "Admin"
and you control their access to your db by setting the rights
on that user.



Sun, 28 Nov 1999 03:00:00 GMT  
 HELP: Access 2.0/VB3 db Security



: How do I protect an MS Access 2.0 database being used in a VB3 app so
: that
: (1) user with Access on their workstations cannot open the database
: unless they have a login name and password and,
: (2) the application can pass a login or password to the database so the
: app can alter the data?
:
: I'd like to simply create two accounts for the database, one for outside
: administrative access and one for the application.  Otherwise, a generic
: user of Access should be barred from opening or modifying the database.

Set up security (take a look at the Access Security Whitepaper in the Access
Knowledgebase) in the database.

In your VB program:

Global wrk As Workspace

In your startup procedure (Form_Load or Sub Main), just before you open the
database:

DBEngine.IniPath = "MYAPP.INI"
' This is the INI file that references your SYSTEM.MDA file
Set wrk = DBEngine.CreateWorkspace("WorkSpaceName","UserName","Password")

replace your database opening command with something like this(basically,
use the OpenDatabase method of the workspace you just created):

Set dbWhatever = wrk.OpenDatabase("MYDB.MDB")

This will cause MYDB.MDB to be opened with user UserName and password
Password instead of user Admin with no password.

Eric Rossing
Intec Company, Inc.



Mon, 29 Nov 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB3 & MS Access 2.0 ...SECURITY

2. VB3 & Access 2.0 setting security from VB

3. Altering Access 2.0 db security rights through VB ?

4. Trouble getting a VB3/Access Jet 2.0 DB App to run in NT4.0

5. Accessing Access 2.0 database with VB3, ODBC 2.0 and Microsotf Jet Engine Compatibility Layer

6. VB3 using Access 2.0 db thru ODBC

7. Bitmap Handle to BLOB (Long Binary) in Access 2.0 DB with VB3

8. VB3.0 & Access 2.0 DB

9. Compact/Repair of Access 2.0 DB in VB3

10. Trouble getting a VB3/Access Jet 2.0 DB App to run in NT4.0

11. Converting Access 2.0 DB to Access 97 DB in VB code

 

 
Powered by phpBB® Forum Software