开发者

using the update query with output clause in the dataadapter

开发者 https://www.devze.com 2023-03-05 06:21 出处:网络
I am usi开发者_Go百科ng the following query for the sqldataadapter\'s update command. For example UPDATE employee SET empage=@eage, empdob = @edob WHERE empid = @eidOUTPUT DELETED.*

I am usi开发者_Go百科ng the following query for the sqldataadapter's update command. For example UPDATE employee SET empage=@eage, empdob = @edob WHERE empid = @eid OUTPUT DELETED.*

I have to read the output clauses row from the RowUpdated event handler. How do i do this.


I don't think you can use the RowUpdated event to accomplish this. Since you are using a custom update statement I assume that you are not using the SqlDataAdapter.Update() method which is what raises RowUpdated.

Instead you should execute the query using SqlDataAdapter.Fill(DataSet). The output rows will be stored in the DataSet.

0

精彩评论

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

关注公众号