tableadapter VB.net 2008 - retrieve identity
I am inserting a record to a MSSQL table using a tabl开发者_如何学运维eadapter using something like: Dim da_mytable As New t_mytableTableAdapter da_mytable.Insert(xxxx,xxxx,xxxx)
The SQL table has an identity field which is also the PK for the table.
The insert works fine, but my question is how to return the ID that was used on the insert.
Thank you.
Solution described here.
http://blogs.msdn.com/smartclientdata/archive/2005/10/31/ReturnIdentityValueQuery.aspx
精彩评论