Why do we need to handle the RowUpdated event of our DataAdapter in order to reflect the ID in a Primary/Foreign key relationship?? Well, anyway here is a page that tells you how to do this.
AddHandler daChargeAttendance.RowUpdated, AddressOf FeeChargeAttendanceRowUpdated Private Sub FeeChargeRowUpdated(ByVal sender As Object, ByVal e As SqlRowUpdatedEventArgs) Dim oCmd As SqlCommand = New SqlCommand("SELECT @@IDENTITY", e.Command.Connection) e.Row("ID") = oCmd.ExecuteScalar() e.Row.AcceptChanges() End Sub
- 01 Jul 2020
- 06 Apr 2020
- 11 Mar 2020
- 15 Feb 2020
- 02 Jan 2020
This site is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. We also participates in affiliate programs with Udemy, and other sites. This site is compensated for referring traffic and business to these companies.