Data integrity

Results 1 to 2 of 2

Thread: Data integrity

  1. #1
    Doug Streitenbergerr Guest

    Default Data integrity

    Does anyone know of a clean way to insure data integrity in an asp environment. For example, if two users request the same record and begin editing the record, then the first user makes his/her changes and saves, then the second user does the same, the data entered by the first user will ultimately be discarded as it is over-written by the second user.<BR>I&#039;ve contemplated using session variables to control/determine if a record is currently being edited...but I&#039;ve heard so many bad things about session variables.<BR>Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default RE: Data integrity

    One way I have used in the past is to store a date/time modified against each row in each table.<BR><BR>Then when you read in the data, store that value in a hidden field.<BR><BR>When the page is submitted, check to see that the date/time value of that row has not changed since they read in the details, if not, go ahead and do the update. If it has changed, display a warning to the user giving them the option to keep either their, or the other users changes.<BR><BR>It&#039;s not perfect, but it works well for low volume sites.

Posting Permissions

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