I appreciate it is more efficient to update data within a temporary store such as the dataSet rather than write to the database every time. But how can I ensure the database gets updated properly and the new data is simply not lost in the session?Any data stored in session is wiped when the session is terminated, either by code or user interaction (closing the browser)
I'm not an expert, but I think if you look at the Page_unload event you could put code there to update our table or alternatively, prompt the user whether to update or not. Again, I am not an expert but the name of the event implies to me you could trap things there.
Hope that helps.
Hello, when u create a dataset, once the page is closed no dataset avialable. so when the page closes and the database wasn't updated, nothing will happen, except that last transaction will not go into action !!!!
once u visit the website again, a new dataset will be created.
recommendation, try to use datareader more than dataset when possible, they are faster !!!
hello haidar - i am designing a dataList which needs to have both editing and deleting facilities. therefore i assume that i will need a dataset/datatable rather than a datareader?
Well yes, better, so that when u do a certain change in data, you can directly update the datasource using the DataAdapter.Update() mehtod.
0 comments:
Post a Comment