February 3, 2008 at 2:43 pm
Hello All,
I am very new to VB.Net and ADO.Net. I have a question regarding the data adapter object and its disconnected architecture.
If one queries the database using a SELECT statement using a data adapter object and fills a dataset and then disconnects from the database, doesn't the retrieved get stale. I mean, if one tries to make changes to the data that is in the dataset that is filled after some time after the data is retrieved, how does one make sure that the data has not been already changed?
It will be great if someone can throw some light on how this can be taken care of.
thanks.
February 8, 2008 at 10:44 am
disconnected pattern relies on optimistic concurrency, but you would have to have a way to detect such conflicts. Fortunately there are several solutions, especially timestamp type
each time a row gets an UPDATE the number in timestamp column gets incremented
- note that this is really a BINARY(8) and nothing to do with datetime!
on reconnection when you attempt a da.Update method you will get an error
- but you have several ways to handle it
suggest you explore these URL's
http://msdn2.microsoft.com/en-us/library/cs6hb8k4(VS.71).aspx
http://msdn2.microsoft.com/en-us/library/bw0db3d9(vs.80).aspx
http://msdn2.microsoft.com/en-us/library/33y2221y(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/bsyy3scy(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/22hhd212(VS.71).aspx
HTH
February 10, 2008 at 8:07 pm
thanks 🙂
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply