It appears that the Concurrency violation is wrapped up with the DBNull
It appears that around line 320 of MySqlClient\CommandBuilder.cs there
is a section commented out dealing with the potential NULL valued fields.
Uncommenting this, with a few minor tweaks, allows the record to save
without the concurrency violation.
I'm not sure what the side effects of this will be. It's obviously been
commented out for a reason, so I'm loath to just re-insert the code and
Reggie - perhaps you can shed some light as to what has changed, and why
DBNull values are not being handled internally by the MySqlClient code
in the manner that they were before?
Barry Zubel wrote:
> Nod, I did notice that. However, most of my database-reading routines
> check each field with the IsDBNull function so it wasn't as hugely
> problematic as it initially seemed. The problem I do have is a
> concurrency violation saving some information (0 records were updated)
> which I'm gonna go dig into now.
> Guy Platt wrote:
>> Thanks for letting me know how to do this. It was quick and easy to
>> I did discover a bug in the way that an empty string is handled by the
>> DataReader .. will go search the MySql bugs now to see whether it has
>> been reported. Basically an empty string is being returned as an
>> <undefined value> which then causes a crash when I try and assign it
>> to a string value.
>> -- Guy