This topic is locked

Session Variables for Query (custom view)

1/21/2011 8:21:49 PM
ASPRunnerPro General questions
G
GerryT author

I am trying to do a query for a custom view where I can match the logged on user to the owner field and display all records where "OWNER" = "LOGGED ON USER". I am unable to find the correct session variables for the Query on custom view. Can you lead me in the right direction?
SELECT

Owner

FROM escalations

WHERE (Owner ='" & SESSION("UserID")')

Sergey Kornilov admin 1/23/2011

You cannot use session variables in SQL query.
You can either use advanced security mode 'Users can see and edit their own data only' or modify SQL Query using events:

http://xlinesoft.com/asprunnerpro/docs/dynamic_sql_query.htm