开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜