System.Data.DBConcurrencyException

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Kanky
Posts: 2
Joined: Tue 28 Mar 2017 14:08

System.Data.DBConcurrencyException

Post by Kanky » Tue 28 Mar 2017 14:14

Hi,

I am trailing the dotConnector for MySQL (latest version) and VS 2017 Using this code:

Code: Select all

Me.Validate()
Me.StudentsBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.BusinessManagerDataSet)
When I try save data I receive (System.Data.DBConcurrencyException) Further details:
'DirectCast(($exception).Row, DXApplication1.BusinessManagerDataSet.StudentsRow).Cert' threw an exception of type 'System.Data.StrongTypingException'
This doesn't happen with the MySQL Connector (6.9.8) for Visual Studio 2015.

Any ideas what I can do to correct this?

Pinturiccio
Devart Team
Posts: 2141
Joined: Wed 02 Nov 2011 09:44

Re: System.Data.DBConcurrencyException

Post by Pinturiccio » Wed 29 Mar 2017 12:23

There is not enough information for reproducing the issue. Please, specify the message and stack trace of the exception and all inner exceptions. Please also create and send us a small complete test project with corresponding DDL\DML scripts which reproduces the issue. Additionally describe the steps to perform with your project in order to reproduce the issue.

Kanky
Posts: 2
Joined: Tue 28 Mar 2017 14:08

Re: System.Data.DBConcurrencyException

Post by Kanky » Tue 04 Apr 2017 06:52

This are the steps I take to produce the error:
  • Create new project
    Add Devart References
    Create new DataSet with 1 datatable
    Drop 2/3 Columns from DataTable onto form.
    Use system generated code to save record.

    Code: Select all

     Me.Validate()
    Me.StudentsBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.BusinessManagerDataSet)
    Receive:
    Exception thrown: 'System.Data.DBConcurrencyException' in Test.exe
    Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.
The form details are updating but I still receive the error. I should also mention that I have set the ID and TimeStamp fields to readonly, AllowNull and modified the update query to ensure that they were not being updated.

Pinturiccio
Devart Team
Posts: 2141
Joined: Wed 02 Nov 2011 09:44

Re: System.Data.DBConcurrencyException

Post by Pinturiccio » Wed 05 Apr 2017 13:19

Unfortunately, there is not enough information for reproducing the issue. Please create and send us a complete test project with corresponding DDL\DML scripts.
Kanky wrote:Drop 2/3 Columns from DataTable onto form.
Please describe what you mean by these words and tell us which columns you used.

Post Reply