March 12, 2010 at 3:20 am
Hi All, its a foolish :ermm: question to ask you all experts, but just wanted to know your thoughts on this scenario.
We have one scenario where have LastUpdated column across all the tables in the database. Currently we are inserting the GETUTCDATE() from application code. We want to restrict it app. code level.
What we want to do is to handle it @ database level. The LastUpdated column should be inserted/updated whenever a new record is inserted or existing record is updated from the application. Even though the it has been written in the app. code (SQL Query) it should handle it @ Database level. One way to do it I have mentioned below can you suggest me any other way....:ermm:
Your suggestions are appreciated.
-Abhijit More
http://abhijitmore.wordpress.com/
Abhijit - http://abhijitmore.wordpress.com
March 12, 2010 at 4:47 am
1. Instead of / After TRIGGER.
2. Ensure all modifications go through a stored procedure, and enforce it there.
March 12, 2010 at 5:13 am
We are not using stored procedures. Dn't ask me y:w00t:
Abhijit - http://abhijitmore.wordpress.com
March 12, 2010 at 5:28 am
Abhijit More (3/12/2010)
We are not using stored procedures. Dn't ask me y:w00t:
To make your life harder? To bloat the procedure cache?
March 12, 2010 at 7:59 am
yeah this is the funny situation where i am stuck now...;-) any solutions to get out of it
Abhijit - http://abhijitmore.wordpress.com
March 12, 2010 at 9:12 am
March 15, 2010 at 12:42 am
Nice answer Paul :). Thanks for your solutions.
Abhijit - http://abhijitmore.wordpress.com
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply