sqlcommandBuilder自增列更新数据回传
数据表中有一列id是int格式自增加的字段,为了能将数据表更新后,取得@@identity的数据,在insertcommand中增加";selec @@identity",但是发现更新过程中,该行没有效果,将select @@identity 改为sele @@identity也不报错,貌似修改的commandText和实际发生作用的commandText不同Dim cbDetail As New MySqlCommandBuilder(daDetail)
daDetail.InsertCommand = cbDetail.GetInsertCommand
daDetail. = daDetail. & ";select @@identity"
daDetail.Update(dtDetail)
dtDetail.AcceptChanges()