Validating Users Through Network

Topher

Registered User.
Local time
Today, 16:08
Joined
Apr 18, 2000
Messages
72
hi, i've done some searching and i can't find anything that answers my question so i apologize if i'm regurgating anything...

i'd like to be able to validate users onto an access97 db through their network domain accounts. that way they only have to remember one password to log on and to log onto the dB =) is this at all possible?? and if so how? i'm afraid my vb skills aren't adept enough to figure this one out.

cheers,
Topher
 
Well this will get you the user's name

Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If lngX <> 0 Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = ""
End If
End Function

After that you have to figure out how to get the password.
 
Actually I did find some code to get the username, although its more complicated than yours.....so i'll try yours! it looks easier....and i was thinking that i could validate the username through the dB instead of having to get the password. that way the user just have to log onto their computer and thats it....depending on the username i'll give out the appropriate permissions..

thanks!
 

Users who are viewing this thread

Back
Top Bottom