December 10, 2008 at 10:34 pm
hi guys,
i want to make a stored procedure to update a field in the table prior to updating the table itself. is there any way to detect this updating event ?
here is basiccally what i want to do:
" IF a table is being updated THEN detect this update AND update a field in this table with date of the update occur "
thanks guys
mailme to : yocki@hotmail.com
December 10, 2008 at 11:12 pm
Hi
I doubt whether a single procedure that detects updates on any of the tables and updates the date column is possible.
You can write update triggers on the tables or
The procedure thats updates the table can update the date column also.
"Keep Trying"
December 10, 2008 at 11:23 pm
so, there is no way to detect the updating event (just like detecting a button click in VB) in SQLServer ?
December 11, 2008 at 1:12 am
i found an article regarding my own question. is this really working ??? anyone has ever used this ?
http://www.eggheadcafe.com/software/aspnet/33464501/detecting-insert-update.aspx
December 11, 2008 at 1:31 am
Just as Chiraq said you can do something like this using triggers but not with a stored procedure. But you must be aware that a trigger will be fired after the update has taken place not before.
[font="Verdana"]Markus Bohse[/font]
December 11, 2008 at 1:55 am
Ok..
many thanks to chiraq & markusB..
December 11, 2008 at 3:58 am
yocki (12/11/2008)
http://www.eggheadcafe.com/software/aspnet/33464501/detecting-insert-update.aspx%5B/quote%5D
Article talks about using a trigger not a stored procedure.
"Keep Trying"
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply