How to Track When a Record Gets Updated

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default How to Track When a Record Gets Updated

    I'd like to be able to automatically store the date and time that a record gets
    updated. I currently stamp the record when it's first created by having a field
    with a default value of GETDATE(), but I can't seem to find an easy way to
    track the updates.

    Thanks!

    OldNapkin Guest

  2. Similar Questions and Discussions

    1. Keep track of who creates a record
      Hi Is there an easy way to keep track of which user that created a record in a database? Who created the record and (if possible) who did som...
    2. using dropdown box to display db record & update record
      Hi Folks, I have a web database written in asp and using access97. I have many projects, but each project is being held responsible by a person....
    3. Datagrid not updated during delete, but updated during insert and update
      Hello everyone. A test webform here, single datagrid bound to one table through dataset, and controls to delete, update and insert data. The code...
    4. Imported + updated symbols don't stay updated
      Hi everybody. I apologize for posting a question that probably any newbie should know, but ... I'm a rank Fireworks newbie. My problem is that the...
    5. Stop adding record in subform after record count = 1
      Can someone help in in what to put after the THEN statment to allow one entry if the Record count is =>1 in the Before insert or should I set the...
  3. #2

    Default Re: How to Track When a Record Gets Updated

    Why not create a field that contains the latest update date?
    jdeline Guest

  4. #3

    Default Re: How to Track When a Record Gets Updated

    I have a field - I'm looking for a function in the database to update the
    field with the date and time when the record gets updated. I know I could
    update it with a query from ColdFusion, but I'd like it all to just happen
    automatically within the DB.

    OldNapkin Guest

  5. #4

    Default Re: How to Track When a Record Gets Updated

    To expand on Dan's post....

    Phil

    Syntax
    CREATE TRIGGER trigger_name
    ON { table | view }
    [ WITH ENCRYPTION ]
    {
    { { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] }
    [ WITH APPEND ]
    [ NOT FOR REPLICATION ]
    AS
    [ { IF UPDATE ( column )
    [ { AND | OR } UPDATE ( column ) ]
    [ ...n ]
    | IF ( COLUMNS_UPDATED ( ) { bitwise_operator } updated_bitmask )
    { comparison_operator } column_bitmask [ ...n ]
    } ]
    sql_statement [ ...n ]
    }
    }

    paross1 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139