I have a small query. For example there are two users who are running a application. When user1 inserts a record into a table can we update the dataset of user2 automatically or alert the user2 to refresh his dataset.
I don't think there's a way, especially if working in disconnected mode.
However, when issuing an update command with a DataAdapter you have various ways to detect if items don't match up.. One way is you can set the ContinueUpdateOnError property to true, when after doing an Update() you can check to see if your DataSet HasChanges property is set to true. If it is you can then copy the un-updated rows to a new table, loop through them to determine why they weren't updated, then display the appropriate errors to the user.
The key to this is really knowing how the CommandBuilder works so you can customize it appropriately. A tip for multi-user databases is to have a timestamp column so you can easily determined when the row was last updated. Using the CommandBuilder you'd simply do an insert WHERE id=? AND lastupdate=? using the original row values (again read up on the CommandBuilder).
I know that doesn't answer your question... but until one of the forum gurus answers it may be a decent alternative to what you're looking for.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.