Re: DBConcurrencyException on dataset update (because of datetime primary key ?)



Did you actually look at the sql statement being used?
I guess there are lot of "where" conditions and if at least one fails then
you'll get no rows updated meaining concurrency exception.
--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"rc" <rchapel@xxxxxxxxxxxxxxxxxx> wrote in message
news:1144829557.449393.270550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I'm writing a VB .NET application that manipulates data in an Access
database.
I fill a Dataset with data extracted from a table of my database,
modifiy one field and try to update with an OleDbCommandBuilder which
throws a DBConcurrencyException.

I think it's because of the primary key of my Access Table which is a
Date/Time field.
I tried to update with a OleDbCommand and wrote the update query but
with the same result.
I also tested to fix the OleDbType of parameters, without success.

However most of rows are updated successfully, this exception occurs
randomly and there is no significant resemblances between rows which
triggers this exception...

Some help would be very welcome.
Thanks you in advance.



.



Relevant Pages