Question Multi-user access to SQL Server records

cyphertoxin

New member
Joined
Nov 24, 2014
Messages
2
Programming Experience
1-3
Hi all, I'm a newbie to this forum so apologies if I've opened this thread in the wrong place.

I'm looking to create a kind of Knowledge Base application which will be located on a server and accessible by several people via a desktop shortcut to the exe located on the server. My question is, how do I handle the accessing and updating of database table records if two users, for example, decide to update a record at the same time? One person might open the record at the same time as the second person, and then they both decide they want to make different updates to that record before saving and closing.

I realise this question may be more relevant to a SQL Server forum, but I'm not sure about this either.

I have successfully created a full-on database application before (about 2 years ago) which used SQL Server as a back-end and vb forms up front for the GUI and interaction. It took me a while as I was on a learning curve, but I completed it and so am now fairly confident I can develop a decent program again, but I'm just not sure on the multi-user side of things.

Any help much appreciated.

Thanks.
 
You should research "optimistic concurrency", which is the preferred option for ADO.NET. In fact, some tools implement optimistic concurrency by default. Basically, everyone is allowed to retrieve any data and try to update that data. When you try to save, the system will detect whether the same data has already been updated by another user since you last retrieved it and notify you. It's up to you to decide what to do at that point. You would generally retrieve the data again and either make your user start again, at least on the records that have changed, or else merge their changes into the current data.
 
Back
Top