Why do we need to handle the RowUpdated event of our DataAdapter in order to reflect the ID in a Primary/Foriegn key relationship?? Well, anyway here is a page that tells you how to do this.

<FONT color=#0000ff size=2>AddHandler</FONT><FONT color=#000000 size=2> daChargeAttendance.RowUpdated, </FONT><FONT color=#0000ff size=2>AddressOf</FONT><FONT size=2><FONT color=#000000> FeeChargeAttendanceRowUpdated</FONT></FONT><FONT color=#0000ff size=2>

Private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Sub</FONT><FONT size=2> FeeChargeRowUpdated(</FONT><FONT color=#0000ff size=2>ByVal</FONT><FONT size=2> sender </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Object</FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2>ByVal</FONT><FONT size=2> e </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> SqlRowUpdatedEventArgs)
</FONT><FONT color=#0000ff size=2> Dim</FONT><FONT size=2> oCmd </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> SqlCommand = </FONT><FONT color=#0000ff size=2>New</FONT><FONT size=2> SqlCommand(“SELECT @@IDENTITY”, e.Command.Connection)
e.Row(“ID”) = oCmd.ExecuteScalar()
e.Row.AcceptChanges()
<FONT color=#0000ff size=2>End</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>Sub</FONT>

http://codeproject.com/cs/database/relationaladonet.asp</FONT>