FreeriderUK
Well-known member
Hi all,
when trying to execute the following code:
I get the following error:
On the form, I have a datagridview (used for display only), two ComboBoxes - one for Payees and another for Categories.
After clicking the ADD button on the BindingNavigator, I then select an item from the Payees ComboBoxes and the above code is executed (I want to send text to a textbox which automatically gets entered into datagrid).
So far so good.
But when I do the same for the Categories ComboBox, I get the above error message.
The thing I don't understand is that this only happens after creating the very first record - If I manually add one record into this table (Access database) everything works fine.
Has anyone else had this problem?
Any possible solutions?
(I'm using VS2005)
Thanks.
when trying to execute the following code:
VB.NET:
Expense_PayeeTextBox.Text = cbEditPayees.SelectedItem.ToString
Me.Validate()
Me.ExpensesBindingSource.EndEdit()
Me.ExpensesTableAdapter.Update(MyCustomersDataSet.Expenses)
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.
On the form, I have a datagridview (used for display only), two ComboBoxes - one for Payees and another for Categories.
After clicking the ADD button on the BindingNavigator, I then select an item from the Payees ComboBoxes and the above code is executed (I want to send text to a textbox which automatically gets entered into datagrid).
So far so good.
But when I do the same for the Categories ComboBox, I get the above error message.
The thing I don't understand is that this only happens after creating the very first record - If I manually add one record into this table (Access database) everything works fine.
Has anyone else had this problem?
Any possible solutions?
(I'm using VS2005)
Thanks.
Last edited by a moderator: