Avatar billede brixpak Nybegynder
16. marts 2010 - 12:49 Der er 11 kommentarer

Login på access database

Kan man bruge windows login til at logge sig på en access database?
Avatar billede terry Ekspert
16. marts 2010 - 16:01 #1
No, unless you make your own login system.
Avatar billede terry Ekspert
16. marts 2010 - 16:02 #2
Avatar billede terry Ekspert
16. marts 2010 - 16:05 #3
If your dB is on a network drive then you could use AD (Active directory) to give users permission to the folder/database. So only users who have these permissions will be allowed to open the dB.
Avatar billede brixpak Nybegynder
16. marts 2010 - 16:12 #4
Hi, Terry, Yes it is on the network, to use AD is a problem since the user has diff level of acces to the DB! Thank any way :)
Avatar billede terry Ekspert
16. marts 2010 - 16:20 #5
"since the user has diff level of acces to the DB!"

You can use Access own user/group security system but that still doesnt use Windows security.

You would need to make your own system which uses the Windows login but it requires some work to make it secure.

I suggest you read the link I gave
Avatar billede terry Ekspert
19. marts 2010 - 11:55 #6
status please?
Avatar billede brixpak Nybegynder
19. marts 2010 - 12:53 #7
Hi Terry, I found this code on: tek-tips.com faq181-93

If you are using a network where users login under a unique ID, you can capture that ID in MS Access.  This FAQ provides the code necessary to capture the ID, validate users that open the database, and disable the shift key for bypassing the autoexec macro.

I thing i will try this.
Avatar billede terry Ekspert
19. marts 2010 - 15:24 #8
can you send me a direct link to that code please?
Avatar billede brixpak Nybegynder
19. marts 2010 - 15:33 #9
Avatar billede terry Ekspert
19. marts 2010 - 16:34 #10
As I thought :o)

This only gives you a method of getting the current users logon (ID). You STILL must make use (code) of the users ID which is also stated in the link >>

"One good example of using the Login ID is to keep users out of a database using this ID.  Create a table with the valid user id's and check the list using an AutoExec macro with the RunCode command.
You will need to:
- Disable the shift key by running the ap_DisableShift function in the debug window (see following Code)
- Check the Login ID in a function (see following Code for ValidateUser) and kick the user out if it does not match."

So the answer I gave "Skrevet tir. d. 16. marts 2010 kl. 16:01:53| #1" is still correct


And if as you say, "the user has diff level of acces to the DB! " then even more code is needed.
Avatar billede terry Ekspert
26. marts 2010 - 17:31 #11
status?
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester