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
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