Simple Dataset Question

R

Rich Wallace

I know datasets have been beaten to death in here, I have what is hopefully
a simple question about the integrity of a dataset when used in an
application.

Scenario:
User A and User B are updating data in a SQL database via an application
that utilizes a dataset, dataadapter and datagrid.

User A retrieves data from data source and sits on the data for some time
User B retrieves SAME data from source, changes data via teh datagrid and
updates the data source using the dataadpter
User A makes changes to the data using the datagrid and then attempts to
update the data source

How smart is the dataset/dataadapter to know that the data was changed by
User B since the last time User A retrieved the data? Will User B's changes
be overwritten by User A's changes?

If so, how does one prevent this or how can the developer notify User A that
the data is no longer accurate based on what they saw in the datagrid?

TIA!
-Rich
 
G

Guest

The dataset/dataadapter in User A will never know that the data was changed by User B because dataset/dataadapter just get a snapshot like a client side cursor. Whether overwrite data changed by User B or refuse data changed by User A depends on how you implement in dataadapter.updatecommand
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top