Page 1 of 1

System.Data.DBConcurrencyException

Posted: Tue 28 Mar 2017 14:14
by Kanky
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?

Re: System.Data.DBConcurrencyException

Posted: Wed 29 Mar 2017 12:23
by Pinturiccio
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.

Re: System.Data.DBConcurrencyException

Posted: Tue 04 Apr 2017 06:52
by Kanky
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.

Re: System.Data.DBConcurrencyException

Posted: Wed 05 Apr 2017 13:19
by Pinturiccio
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.