Thursday, July 30, 2009

About Session state in Webservice using c#.net?

Dear friend,





I have a doubt in C#.net. There are one Database, But at the same time 2 persons accesing the same database at the same time, one person inserting 10 records, another person retrive 10 records from the same database. My doubt is how can 2nd persone retrive the same datas in the same database?





if any person solve this or handle the same situation in database, pl. advice me how to use this in my side.





Thanks,

About Session state in Webservice using c#.net?
By definition, the Web is "Stateless".





A person running a Query will only get the results of the records that are in the database "at that time".





To "get the latest results" (at any given time), the User needs to rerun the Query. By "locking" a database or using "transactions", when inserting, you can insure a User gets zero or only all 10 records after an insert (instead of only the first couple if he queries while the insert was in progress).





A Web Site can "push" changes to a User, but this is almost never done, because it means additional work on the server and can lead to performance and complexity problems.


No comments:

Post a Comment