Concurrency violation (once more...)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Gerard van Dorth (gerard.van.dorth_at_tip.nl)
Date: 06/22/04


Date: Tue, 22 Jun 2004 15:22:37 +0200

Hi,

Got a databound DataGrid,
add a record, update the undelaying database (single user/single session),
make a change on de newly created record
try to update: error "Concurrency Violation"

In samples I saw the DataGrid binds the data again after an update
in ths WinAppl I don't want the re-bind (takes too long).

Why do I get the "Concurrency Violation" and how to prevent it withou a
re-bind?

The update code is straight-forward:

dim da as OleDataAdaptor = new OleDataAdaptor(theSelect, theConnect)
dim cmdBld as OleCommandBuilder = new OleCommandBuilder(da)
da.Update(theDataSet, theTable) // One of the 2 tables involved

Thanks in avdance for any help,
Gerard