PDA

Click to See Complete Forum and Search --> : Anyone have any Ideas of Updating records in a multi user environment???


tomtan
Aug 4th, 2000, 01:02 AM
Anyone have any Ideas of Controling the Updating of records in a multi user environment??

Let say User A Modifies Record 1
and User B also Mofifies Record 1

User A saves the record first and followed by User B.

User A changes will be overwriten.

How to design a better way to Control this kind of situation?

pardede
Aug 4th, 2000, 04:26 AM
Just some thought... (i.o.w., i don't know if these ideas workable but hey, it might worth considering)

Instead of writing the whole record when updating, try to perform the update on the field level, thus not using Update method of recordset but using SQL's update statement. If this is possible, then all other fields on the table will be left in its last status. However, it is still a problem if both user A and B edits the same field(s), but then again, you can decide that the last edit is leading...

One thing you can always consider is to tell the user about the conflict and ask him what to do...

tomtan
Aug 4th, 2000, 04:42 AM
Thanks pardede..

Do you know the Difference of adOpenDynamic & adOpenKeySet?

I'm using adOpenDynamic of the recordset. If my recordset is still open and other user add or delete any records, I will be unable to see the changes..

Until I do "Recordset.Requery" then I can see the changes..

Any Idea?

tomtan
Aug 4th, 2000, 09:21 PM
Using ADO.

I have done some test on adOpenDynamic ..

When I use the Database connection Execute Command to update the record.. the recordset will not be refresh.

If I use the recordset.update then the recordset will be refresh.

Any Idea?