DBConcurrencyException was unhandled by user code
Posted: Tue 23 Jun 2015 14:29
Dear Sir/Madam,
I am using dotConnect Universal Professional to connect SQLite in single user mode for testing. After setup the Oracle XE, I upgraded my application as the server version for multiple users.
However, I edited the data and moved among the rows in the Dataview. The error was happened with the message "DBConcurrencyException was unhandled by user code" while updating the Oracle database through DataAdapter.Update(datatable). May I ask how the dotConnect Universal Professional handle the row concurrency of the Oracle database? Would you have any idea to resolve the problem?
Thanks Million
Richard
My Snippets
A) Connection Strings
OracleConnection1 = @"Provider=Oracle;direct=true;data source=192.168.1.15;port=1521;sid=xe;user=hkxxxx;password=dataxxxx";
B) Create Datatable
UniConnection2.Open();
UniCommandText = String.Format("Select * From QuoteItems Where QuoteNo = '{0}' Order by QuoteNo, ItemID", QuotationNo);
UniDataAdapter2 = new UniDataAdapter(UniCommandText, UniConnection2);
UniCommandBuilder2 = new UniCommandBuilder(UniDataAdapter2);
UniDataTable2 = new DataTable();
UniDataAdapter2.Fill(UniDataTable2);
if (UniDataTable2 != null)
{
GridControl1.DataSource = UniDataTable2;
}
C) DataAdapter.Update
private void GridView1_RowUpdated(object sender, Views.Base.RowObjectEventArgs e)
{
UniDataAdapter2.Update(UniDataTable2);
}
I am using dotConnect Universal Professional to connect SQLite in single user mode for testing. After setup the Oracle XE, I upgraded my application as the server version for multiple users.
However, I edited the data and moved among the rows in the Dataview. The error was happened with the message "DBConcurrencyException was unhandled by user code" while updating the Oracle database through DataAdapter.Update(datatable). May I ask how the dotConnect Universal Professional handle the row concurrency of the Oracle database? Would you have any idea to resolve the problem?
Thanks Million
Richard
My Snippets
A) Connection Strings
OracleConnection1 = @"Provider=Oracle;direct=true;data source=192.168.1.15;port=1521;sid=xe;user=hkxxxx;password=dataxxxx";
B) Create Datatable
UniConnection2.Open();
UniCommandText = String.Format("Select * From QuoteItems Where QuoteNo = '{0}' Order by QuoteNo, ItemID", QuotationNo);
UniDataAdapter2 = new UniDataAdapter(UniCommandText, UniConnection2);
UniCommandBuilder2 = new UniCommandBuilder(UniDataAdapter2);
UniDataTable2 = new DataTable();
UniDataAdapter2.Fill(UniDataTable2);
if (UniDataTable2 != null)
{
GridControl1.DataSource = UniDataTable2;
}
C) DataAdapter.Update
private void GridView1_RowUpdated(object sender, Views.Base.RowObjectEventArgs e)
{
UniDataAdapter2.Update(UniDataTable2);
}