Re: Eliminating multiple logins in VB6 with SQL svr
- From: "Ian Williams" <ian@xxxxxxxxxxxxxxx>
- Date: Wed, 9 Apr 2008 07:45:28 +0100
Here you go
http://vbnet.mvps.org/code/network/netusergetinfo.htm
regards
Ian
*** inavlid email address - change country code to full country name
"BruceL" <BruceL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B0601C0C-D9D2-45AF-8AD7-B9AC04BE1AE0@xxxxxxxxxxxxxxxx
I have a VB6 app running under client server and would like to eliminatethe
VB6 user login I created to validate users. Users have already logged inpasswords.
through active directory so their login is valid by the time they want to
open my VB6 app.
Currently I have a SQL server table that holds my user names and
When the user opens my app they enter the user name and password which Icall
validate from my table to allow entry. In the login screen I use an API
to GetUserName which plugs the current computers user name in the namefield
and if I have set up their user name in my SQL svr table they only need toSQL
enter their password to continue but it is still a separate login.
I need to check the user name when my app starts to limit their recordset
information to say, different states or counties, so I would still need a
svr table that I could match their active directory name to. I wouldwould
initially put their active directory user names into the table to match up
with when a user opens my app and then I wouldn't need the additional VB6
login.
So, in summary, when a user opens my app, how do I get their active
directory user name so I can then match it to my SQL svr table?
I don't think my API call would get the active directory user name or
it? I have listed the API call below.
GetUserName
Dim sBuffer As String
Dim lSize As Long
sBuffer = Space$(255)
lSize = Len(sBuffer)
Call GetUserName(sBuffer, lSize)
If lSize > 0 Then
txtUserName.Text = Left$(sBuffer, lSize)
Else
txtUserName.Text = vbNullString
End If
Any help on this would be great. I usually know just about enough to get
myself into trouble.
Thanks,
--
BruceL
.
- References:
- Eliminating multiple logins in VB6 with SQL svr
- From: BruceL
- Eliminating multiple logins in VB6 with SQL svr
- Prev by Date: Re: How to write out current time including milliseconds?
- Next by Date: Re: No help available in VB6.
- Previous by thread: Eliminating multiple logins in VB6 with SQL svr
- Next by thread: Automatically Update Your Software?
- Index(es):
Relevant Pages
|