|
-
Oct 7th, 2004, 07:43 AM
#1
Thread Starter
Fanatic Member
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
-
Oct 7th, 2004, 08:37 AM
#2
I think the last person who updates the last will have their changes saved. Others will be overwritten.
Woka
-
Oct 8th, 2004, 03:27 AM
#3
Thread Starter
Fanatic Member
Do the users get any warning woka ?
woof woof
-
Oct 8th, 2004, 04:18 AM
#4
WOOF WOOF!
Errr...no.
It doesn't work like ado in VB6 and an open editable recordset.
Wokkkkkkk
-
Mar 8th, 2005, 01:18 PM
#5
Member
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
-
Mar 8th, 2005, 01:43 PM
#6
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
-
Mar 9th, 2005, 04:48 AM
#7
Fanatic Member
Re: Datasets and updates
 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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|