2 Replies Latest reply on Feb 25, 2008 4:28 PM by Newsgroup_User

    SQL datetime update when record modified???

    Level 7
      I'm have a difficult time figuring out how I can update the datetime value
      in previously entered records using the current datetime in MSSQL 2005.

      Currently I'm making an inventory webpage using DW CS3, ASP.NET 1.1.
      Inventory is added and I've made a page to audit inventory. I can scan an
      item, it will be displayed, then I can change quantities or locations and
      submit the datagrid changes. The changes all take effect just fine, but the
      datetime stamp stays the same.

      I've read that the MSSQL 2005 does not change the to the current datetime on
      update, only on insert new record.

      How can I make this happen? Where might I add script for SQL such as. Can
      I use the EVENT - On.Update.Command under the datagrid Tag?

      update dbo.PARTS
      set audit_date = getdate()

      where ID = @paramid

      Any help would be greatly appreciated.
      Casey Swett