Concurrency Violation w/ Access Database during Update()

S

Steve Hiemstra

Hi All,

I have a DataTable that needs an Update, but I am relying on the
CommandBuilder to create my Insert, Update, and Delete statements for me. I
have to - since my DataTable is free-formed (realtime), and I therefore need
to get my SQL elements from the currently defined Columns (for my Select,
Insert, Update, and Delete statements).

I have had no problems making Updates to MS-SQL Server databases using this
technique. It is only failing in Access, and only when ANY of the fields in
the database row has an 'empty' value (empty string or DBNull).

For example - if I have values in all of the fields in my row and I change
one fields' value - the Update works fine (in Access & MS-SQL Server). If I
delete a value in one of the fields in the row (say, set a string to "",
<empty> for a field of 'Text' datatype) - that works too. But now - since I
don't have a value in one of my fields in this row - the next Update (let's
say I'm putting the value back into the empty field) fails w/ a Concurrency
Violation.

Please Note: This does not happen MS-SQL server (it works fine with this),
only Access.

Please Help,

Steve
 
S

Steve Hiemstra

Aggghh!! It fails the same way for MS-SQL Server too. Is there some
parameter in my DataAdapter (or CommandBuilder) I can set to override this
annoying 'Concurrency Violation' behavior?
 

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