By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,265 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,265 IT Pros & Developers. It's quick & easy.

Raising events from sql server 2005

P: 2
Hi Team,
I have a strange requirement where in which, the running application should know when the permission of the user in the DB has been changed. If that is changed then the session must expire automatically and shouldn't allow the user to go fwd.

I am thinking of a solution where in which we can raise an event from the SQL Server 2005 DB upon role change and there by handling the event in the ASP.NET C# program and expire the session.

Can anyone please throw some light on this on how to raise the .Net events from the sql server DB upon a change in DB happens.

Sep 16 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 2,878
All I can think of is to keep track of the session through a table. Every time you access your APP, the first thing it will do is to check that table. That would mean you have to keep your session id somewhere and bring it your the app. Whenever there are changes on the permission, that table should be updated. You can also have a smalldatetime column to signify the last time the application was used. If the current date/time is longer than x minutes than the last access, you can expire the session as well.

Just a thought....

-- CK
Sep 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.