Trying to get the Autoincrement ID of a row after TableAdapter.Update. The data is Binded so there's no row being added to the datatable as in this case.
Any ideas on how to solve this?
Thank you
Trying to get the Autoincrement ID of a row after TableAdapter.Update. The data is Binded so there's no row being added to the datatable as in this case.
Any ideas on how to solve this?
Thank you
Why not use this after TableAdapter.Update
:
CType(xBindingSource.Current, DataRowView).Item("ID")
You need to retrieve the newly created id by including a select statement in your insert query; you need to change the executemode to Scalar, too. This blog post has more detail