Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 751215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:38:29+00:00 2026-05-14T14:38:29+00:00

For one of my recent projects, I had to implement field change tracking .

  • 0

For one of my recent projects, I had to implement field change tracking. So anytime the user changed a value of a field, the change was recorded in order to allow full auditing of changes.

In the database, I implemented this as a single table FieldChanges with the following fields:

  • TableName
  • FieldName
  • RecordId
  • DateOfChange
  • ChangedBy
  • IntValue
  • TextValue
  • DateTimeValue
  • BoolValue

The sproc saving changes to an object determines for each field whether it has been changed and inserts a record into FieldChanges if it has: if the type of the changed field is int, it records it in the IntValue field in the FieldChanges table, etc.

This means that for any field in any table with any id value, I can query the FieldChanges table to get a list of changes.

This works quite well but is a bit clumsy. Can anyone else who has implemented similar functionality suggest a better approach, and why they think it’s better?

I’d be really interested – thanks.

David

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:38:29+00:00Added an answer on May 14, 2026 at 2:38 pm

    The enterprise pattern for this is to have a amendment shadow table for every table you create to show the after-image (and possibly a before image) for all columns.
    You will need:

    • scripts to create the amendment table
    • the triggers to populate them
    • and maintain the above when the table changes over time.

    But for a well setup enterprise all this should already be in place.

    My organisation only uses this for the following:

    • An audit for dbas and support to manually determine what happened (using SQL).
    • Enterprise Data Warehouse (SAS) sucks all delta’s from the production systems for analysis.

    We create different tables if they are needed for the operational systems themselves.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using custom user accounts for one of my projects and am using
For one of our recent projects, we created a stored procedure which generated SQL
I am reading in the F# specification - the most recent one that I
I have two sections next to eachother- one is for recent work, the other
Using a technique I found in one of the recent ASP.NET MVC books, I
The recent update (V 20.x) of Chrome has broken one of my forms with
In recent versions of python, one can use something like with open('abc.txt') as f:
I want to record my most recent cd across any one of my terminals.
There was a recent article that Linux kernel 3.3 has integrated Android as one
I'm trying to select most recent date from one table (invoice) to a customer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.