PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET MS Access Security

Reply

MS Access Security

 
Thread Tools Rate Thread
Old 19-06-2006, 02:04 PM   #1
JosephByrns
Guest
 
Posts: n/a
Default MS Access Security


Can someone please advise me on Access security (generally I use SQL Server,
where security is much more straight forward to set up).

I have an Access db with users setup using Tools->Security->User and Group
Accounts.
I then create the various permissions using Tools->Security->User and Group
Permissions.

This all works fine when using Access to open mdb files, i.e. the users are
prompted for username and password and only have the permissions on each
table appropriate to that user.

However, if I use .NET to access the database I must enter nothing for the
username and password or I get a failed access error (if I enter nothing
then I have full access to the database). What is going wrong, can I not
have users when accessing an Access database from .NET?

Thanks.


  Reply With Quote
Old 19-06-2006, 04:35 PM   #2
Paul Clement
Guest
 
Posts: n/a
Default Re: MS Access Security

On Mon, 19 Jun 2006 14:04:01 +0100, "JosephByrns" <josephbyrns@yahoo.com> wrote:

¤ Can someone please advise me on Access security (generally I use SQL Server,
¤ where security is much more straight forward to set up).
¤
¤ I have an Access db with users setup using Tools->Security->User and Group
¤ Accounts.
¤ I then create the various permissions using Tools->Security->User and Group
¤ Permissions.
¤
¤ This all works fine when using Access to open mdb files, i.e. the users are
¤ prompted for username and password and only have the permissions on each
¤ table appropriate to that user.
¤
¤ However, if I use .NET to access the database I must enter nothing for the
¤ username and password or I get a failed access error (if I enter nothing
¤ then I have full access to the database). What is going wrong, can I not
¤ have users when accessing an Access database from .NET?

What is the error you are getting? Can you post an example of your connection string?

If you can open the database without a user ID and password it sounds as if the database has not
been secured.


Paul
~~~~
Microsoft MVP (Visual Basic)
  Reply With Quote
Old 19-06-2006, 05:26 PM   #3
Mary Chipman [MSFT]
Guest
 
Posts: n/a
Default Re: MS Access Security

If you can get in entering nothing for the user name and password,
then you've left out a step securing the database, which is easy to
do. I assume that you realize that Access security isn't really secure
-- an Internet search will yield an awful lot of hits of people
willing to crack it for you for a small fee. Access security is good
for deterrence only, which is why many people opt to junk it entirely
because it's so hard to get right and of such limited use. You can
download the security FAQ from
http://www.mvps.org/access/resources/techpapers.htm.

That being said, you also need to specify the name and location of the
workgroup file (.mdw) in the connection string:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\mydb.mdb;Jet
OLEDB:System Database=c:\system.mdw;"

--Mary

On Mon, 19 Jun 2006 14:04:01 +0100, "JosephByrns"
<josephbyrns@yahoo.com> wrote:

>Can someone please advise me on Access security (generally I use SQL Server,
>where security is much more straight forward to set up).
>
>I have an Access db with users setup using Tools->Security->User and Group
>Accounts.
>I then create the various permissions using Tools->Security->User and Group
>Permissions.
>
>This all works fine when using Access to open mdb files, i.e. the users are
>prompted for username and password and only have the permissions on each
>table appropriate to that user.
>
>However, if I use .NET to access the database I must enter nothing for the
>username and password or I get a failed access error (if I enter nothing
>then I have full access to the database). What is going wrong, can I not
>have users when accessing an Access database from .NET?
>
>Thanks.
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off