This topic is locked

Display only Users Information

5/21/2007 2:11:01 PM
ASPRunnerPro General questions
T
tgunther author

Is there a way to display only a users data based off of their Active Directory Logon? I currently have a field in my table that uses

Request.ServerVariables(LOGON_USER)

to get the users Active Directory username, can I use this information to filter the data to display only entries made by this user? The field that records their user name is called ADUsername is it possible to simply place a where statement on that field that uses a similar method as the Request.ServerVariables(LOGON_USER)?

J
Jane 5/22/2007

Hi,
to show records for logged user only use User can see and edit their own records only option on the Advanced security settings dialog on the Security tab.

T
tgunther author 5/22/2007

Hi,

to show records for logged user only use User can see and edit their own records only option on the Advanced security settings dialog on the Security tab.


Thank you for the response, unfortunately this doesn't answer my question. I am aware of the advanced security settings, but this requires a logon to be created. I am trying to avoid this by simply filter based off of the users active directory account. For instance if I where to modify the select statement to:

gstrSQL = "select [EmployeeNumber], [FirstName], [MiddleInitial], [LastName], [ADUsername], [UID] From [dbo].[EmployeeTable] WHERE ADUsername = Request.ServerVariables(LOGON_USER)"

Where ASUsername has already been populated with there AD username.

Obviously this will not work because SQL does not understand Request.ServerVariables(LOGON_USER), but is there a way to get a similar result. When a user opens our intranet they are required to enter in their active directory username and password, therefore there is already a required logon. I am now trying to filter the results of the asprunner project so that it filters based off of the person who has logged in. We are trying to avoid having to place multiple logons and create a whole new user database. I have read through the other posts about Active Directory, but I have not found a way to filter based off of Active Directory. If this is possible to do your help is greatly appreciated. Thank you in advance for any help you may be able to give. Also, your software is absolutely amazing! Great Job, it has really helped our company!

T
tgunther author 5/24/2007

I was able to get this to work by modifying my select statement to say:

gstrSQL = "select [EmployeeNumber], [FirstName], [MiddleInitial], [LastName], [ADUsername], [UID], [Password] From [dbo].[EmployeeTable] where [ADUsername] = '" & Request.ServerVariables("LOGON_USER") & "'"



Thanks for all the help in the past.