This topic is locked

List.asp based on a field in table

8/28/2007 8:19:07 PM
ASPRunnerPro General questions
lefty author

I want to list only specific records belonging to a certain group without having to enter permissions for each user in the advanced security area. I tried to use this in ListonLoad Event but does not seem to work getting data type mismatch error.
Here is my code:
str = "select fldgroup from users where UserId='" & Session("UserID") & "'"

Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection

Session("fldgroup")= rsTemp("fldgroup")
strSQL = AddWhere(strSQL, "[fldgroup]='" & session("fldgroup") & "'")

Sergey Kornilov admin 8/29/2007

Use ASPRunnerPro 5.1 and BeforeSQLQuery event.