Getting @@IDENTITY from TableAdapter

前端 未结 7 2172
自闭症患者
自闭症患者 2020-12-19 20:21

I am trying to complete a seemingly simple task that has turned into a several hour adventure: Getting @@Identity from TableAdapter.Insert().

7条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 20:30

    You'll need to setup the insert to return the identity as an output value and then grab it as a parameter in your adapter.

    These two links should get you going:

    http://www.akadia.com/services/dotnet_autoincrement.html

    http://msdn.microsoft.com/en-us/library/ks9f57t0.aspx

提交回复
热议问题