Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Passing Parameters to Triggers from an ASP page

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-03 : 10:05:30
Amy writes "I am creating a website for a client that based on the users' role, they are allowed to create, update, insert, delete, view, etc...records. In order to accommodate this we have created a link table between roles and privileges. The privileges table holds the 'rights' per column. The table is set up such that it contains: PrivID, TableName, ColumnName. I would like to set triggers on the tables, since the coding would be extremely cumbersome and redundant. Of course, within the trigger will be the SQL to relate the roles and privileges based on what function(i.e. add, edit, delete) to a table or set of tables the user is trying to do. For example, UserA has RoleA and Priv1, Priv2, Priv3. UserB has RoleB, Priv2, Priv4. Both UserA and UserB are viewing page ASP1.asp. The data displayed is similar for both UserA and UserB, however UserA has Priv1, Priv2 for this ASP1.asp page. UserB has only Priv4 for ASP1.asp page. UserA is trying to perform Priv1 on the data being displayed. Since the security goes down to the column level, is there a way to use request.querystring which provides UserAs' role and privileges to fire off the triggers contained in the table that they are trying to perform.

I guess an easier way to state this would be, can you pass parameters into a trigger? And how?

Thank you for your time,
Amy"
   

- Advertisement -