Billybonga
IS-IT--Management
Hi,
I'm workign on a project where I have hit a stumbling block with an SQL query.
I want to search a MS Access database table (tbl_company) which contains Usernames & Department for every employee.
I have the system working so far in that search the database and determine if a user is in a table -
but want i want to try to figure out now is - detect what group the user is in, and redirect them by their group e.g.
User loads the .asp page, check what group their username is in, if in administration - redirect to admin.asp, if in IT redirect to it.asp etc
Any help is appreciated.
I'm workign on a project where I have hit a stumbling block with an SQL query.
I want to search a MS Access database table (tbl_company) which contains Usernames & Department for every employee.
I have the system working so far in that search the database and determine if a user is in a table -
Code:
<%
set objconn = server.createobject("adodb.connection")
objconn.open "william"
set objrec = server.createobject("adodb.recordset")
' Retrieve the Windows Domain Username
username = request.servervariables("LOGON_USER")
'Search for records of Username
set RS = objconn.execute("select * from tbl_people where Name = '"&username&"' ")
if RS.EOF = False then
'If Username already exist then redirect -
response.redirect "block.asp"
End If
%>
but want i want to try to figure out now is - detect what group the user is in, and redirect them by their group e.g.
User loads the .asp page, check what group their username is in, if in administration - redirect to admin.asp, if in IT redirect to it.asp etc
Any help is appreciated.