Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO.NET Disconnected Architecture

Status
Not open for further replies.

djayakum

Programmer
Feb 2, 2002
28
IN
Hi

while using ADO.NET's Disconnected Architecture if the multiple users updating the database(dataset) what will hapen ?

If i use the DataSet ADO.NET's Disconnected Architecture i dont want to make the connection so am doing some chages in dataset ,at the same another person also connect to database by using dataset and modify the dataset so both of our data are not using real data , how in ado.net managing this problem to maintain the same data(updated data) ?

JK


 
JK,
That's one of the drawbacks of disconnected scenarios and there's really nothing you could do to avoid the fact that two users may be seeing outdated data. You have to decide if your application tolerates such behavior. If it doesn't, you shouldn't use ADO.NET's disconnected architecture, and you should opt for a connected scenario instead. In a disconnected app, the only way to keep the two users updated at all times would be to have the dataset updated every, say 10 seconds, but that would degrade performace tremendously.

What you can do, however, is deal with update conflicts. I mean, disconnected applications must provide a way for the user to save his changes. When the user clicks on that "Save/Update" button, you will have a chance to find out if other users have updated the same records, and take action accordinly.

It would be unwise to describe here all the techniques used for dealing with update conflicts, but you could take at look a this MSDN Library article which does a good job in doing just that.

Hope this helps!

JC

Friends are angels who lift us to our feet when our wings have trouble remembering how to fly...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top