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

Re: Concurrency Violation w/ Access Database during Update() by Steve

Steve
Tue Jul 18 16:30:48 CDT 2006

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?

"Steve Hiemstra" <SHiemstra@AnyDocSoftware.com> wrote in message
news:uZTbUrqqGHA.5108@TK2MSFTNGP05.phx.gbl...
> 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
>