Dataset is sharing among the Users

Posted by Mukeshsakre under ASP.NET on 1/18/2010 | Views : 1497 | Status : [Member] | Replies : 5
Hello guys,
I am developing multiuser application in which I am using single dataset on multiple pages.For holding dataset I am using session but still dataset is sharing.changes of one user reflects changes on another user's screen.please let me know the solution.




Responses

Posted by: Khushigawade on: 1/18/2010 [Member] Starter

Up
0
Down
saasda

Mukeshsakre, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mukeshsakre on: 1/18/2010 [Member] Starter

Up
0
Down
actually i need the solution urgently.Please let me know somthing about it.

Mukeshsakre, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Poster on: 1/18/2010 [Member] Starter

Up
0
Down
The data should not be shared across multiple session unless on every request you are again getting the data from database and holding into DataSet and putting that DataSet into Session.

If not, are you by chance using Application variable? It can share the values across all the users.

Thanks

Mukeshsakre, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mehulthakkar1 on: 1/18/2010 [Member] Starter

Up
0
Down
Use static dataset or application variable.



Mukeshsakre, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 1/18/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
i Once Developed an Application with for once Government Department. They were 30 Users on the Connecting. Now this was a Gridview Manipulation Application and they share a DataSet and i was lucky because certain users were allowed to see certain Data, and to implement that was easy, but now the Concurrency problem occurred when User1 retrieve Data and User2 Retrieve Data and User1 Update Data and the Data that is held by user 2 is now Stale or Junk Data and the Changes made by user2 will be lost. So every time a user retrieve Data i locked it so that another user cannot retrieve the data, but the Supervisor has rights to unlock Data and there was no Concurrency again. But in your Situation locking might not be an Option. You can try Optimistic Concurrency handling and here are the Links for that

http://msdn.microsoft.com/en-us/library/cs6hb8k4%28VS.71%29.aspx


http://msdn.microsoft.com/en-us/library/aa0416cz.aspx


http://channel9.msdn.com/posts/mtaulty/ADONET-Data-Services-VS08-Sp1-B1-Optimistic-Concurrency/



http://davidhayden.com/blog/dave/archive/2005/10/05/2503.aspx


Thank you for posting at Dotnetfunda

Vuyiswa Maseko




Thank you for posting at Dotnetfunda
[Administrator]

Mukeshsakre, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response