I have a strange probelem.
My form only inserts into the database.
To get all the table adapters etc on my form, I drag on the required database table from Data Sources then remove the binding navigator strip.
In the auto generated form-load procedure I add a
Then allow the user to input data in the form
- and initialise the new record.
- end the form load procedure.
This works on all except the first attempt at insert which inserts a blank row and form fails with "Concurrency violation: the UpdateCommand affected 0 of the expected 1 records2.
- check all data is valid and all keyed in
- save using myTableAdapter.Update
When I re-run the project - subsequent rows are inserted OK. The inital blank row is not updated and subsequent re-starts of the project to add more data does not overwirte any rows.
My initial table is empty.
Is there something I need to do to insert a first row in a datatable rather than AddNew?