SQL Query based on Session Variable

K

Keith

I have a SQL DB with a number of tables and queries (views) in.

In front of this is my ASP app I am designing.

When my users log in, their User ID is stored in a session variable.

One of the views determines which User ID can access which records, and
obviously then I want to base all my app around this so that a user can only
ever be working on data relevant to them.

Is there any way of using a variable in my SQL View outside of DWMX so that
once my users log in, the SQL View is automatically filtered based on their
User ID in the session variable?

Is there a way of inserting a variable/parameter into SQL so this happens?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top