Results 1 to 7 of 7

Thread: Datasets and updates

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Datasets and updates

    If 2 users each have a disconnected dataset which lets say contains a set of customers which they add/amend and delete from then how is the update carried out on the server ?

    I can't get my head around this problem with concurrent users and update anomolies.

    TIA

    Parksie

  2. #2

  3. #3

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    Do the users get any warning woka ?

    woof woof

    Parksie

  4. #4

  5. #5
    Member
    Join Date
    Aug 2001
    Location
    Ottawa
    Posts
    38

    Re: Datasets and updates

    This maybe a little late in replying, but what I do is date/time stamp when the last record was saved/updated. When the data is viewed to the screen, each row has a date/time stamp of when it was last updated. When they go to perform the update, I check to see if the date/time stamp still matches what's on the screen. If it does, then the record has not been updated since the user viewed that records and it's safe to update now (also update the date/time stamp). If the date/time stamp does not match, then I don't allow the update. It's not 100 % fool proof, but it's pretty close (it eliminated allot of problems here). I can provide more detail if needed.

    Chris

  6. #6
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Datasets and updates

    I add an UpdateUserID field to the table.
    When a user edits a record I set this field to their ID.
    This way, you know if it's being editted, and can stop someone editting the same record.

    Woka

  7. #7
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870

    Re: Datasets and updates

    Quote Originally Posted by cfisher
    This maybe a little late in replying, but what I do is date/time stamp when the last record was saved/updated. When the data is viewed to the screen, each row has a date/time stamp of when it was last updated. When they go to perform the update, I check to see if the date/time stamp still matches what's on the screen. If it does, then the record has not been updated since the user viewed that records and it's safe to update now (also update the date/time stamp). If the date/time stamp does not match, then I don't allow the update. It's not 100 % fool proof, but it's pretty close (it eliminated allot of problems here). I can provide more detail if needed.

    Chris
    This is the way I have always done it in the past as well. Having a business layer helps with this as you can put all the code to deal with the checking of dates and times in there.
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

Posting Permissions

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



Click Here to Expand Forum to Full Width