From a long time i have an interesting question in my mind.Would you people like to clear me here in this case.
Lets say we have one database. Two applications are using the same database.mean App1 and App2.
Lets say here is a table named Table1.At the same time from different locations both applications(consider applications as operators) wants to edit/Update record num 5.How we will have a check that to control ans synchronize both application.
For example record 5 have amount 10.if this is not syncronized one operator will see 10 and other wll see 15(when one update to 15).
Hope you got it?
I don't know which kind of technology you are now using……So if you are using the general ADO.NET,I think you can refer this nice article of Avoiding Concurrency at:
shafiqkr
Member
454 Points
372 Posts
Conconrency Issue
Feb 23, 2012 06:05 AM|LINK
From a long time i have an interesting question in my mind.Would you people like to clear me here in this case.
Lets say we have one database. Two applications are using the same database.mean App1 and App2.
Lets say here is a table named Table1.At the same time from different locations both applications(consider applications as operators) wants to edit/Update record num 5.How we will have a check that to control ans synchronize both application.
For example record 5 have amount 10.if this is not syncronized one operator will see 10 and other wll see 15(when one update to 15).
Hope you got it?
duzi
Member
355 Points
90 Posts
Re: Conconrency Issue
Feb 23, 2012 06:27 AM|LINK
Entity Framework take care of this problem. But it is a real problem that you have to manage it in order not to get not correct results.
shafiqkr
Member
454 Points
372 Posts
Re: Conconrency Issue
Feb 23, 2012 06:53 AM|LINK
What does this mean?
tdykstra
Contributor
4475 Points
625 Posts
Microsoft
Moderator
Re: Conconrency Issue
Feb 23, 2012 05:27 PM|LINK
What are you using for database access: Entity Framework, Linq to SQL, raw ADO.NET, or something else?
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Conconrency Issue
Feb 25, 2012 12:07 AM|LINK
Hello shafiqkr:)
I don't know which kind of technology you are now using……So if you are using the general ADO.NET,I think you can refer this nice article of Avoiding Concurrency at:
http://www.asp.net/web-forms/tutorials/data-access/editing,-inserting,-and-deleting-data/implementing-optimistic-concurrency-cs
For EF,You should set properties and make your EF data model can avoid Multiple users Concurrency problem at:
http://blogs.msdn.com/b/cesardelatorre/archive/2008/09/05/optimistic-concurrency-updates-using-entity-framework-in-n-tier-and-n-layer-applications-part-2.aspx
thaicarrot
Contributor
5132 Points
1465 Posts
Re: Conconrency Issue
Feb 25, 2012 12:59 AM|LINK
We haven't more choice to solve this issue. There's two way as I know you can do.
1.Using Thread at client refresh the data from server every minutes(minutes depending on you).
2.using Duplex Service similar the first one check out this http://msdn.microsoft.com/en-us/library/ms731064.aspx
Weera
shafiqkr
Member
454 Points
372 Posts
Re: Conconrency Issue
Feb 27, 2012 08:18 AM|LINK
All of you are informed that i am using Enterprise library 5.0
thaicarrot
Contributor
5132 Points
1465 Posts
Re: Conconrency Issue
Feb 27, 2012 04:43 PM|LINK
To solve the issue it is depending on EF version.
Weera
shafiqkr
Member
454 Points
372 Posts
Re: Conconrency Issue
Feb 28, 2012 04:46 AM|LINK
So i had cleared that i am using EntLib5.0 and VS2010(4.0)
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Conconrency Issue
Feb 28, 2012 04:49 AM|LINK
Problem solved?Congratulations!