源码如下
Try
Dim tempRow As DatabaseDataSet.TempRow
tempRow = DatabaseDataSet.Temp.FindByTempHuman(0)
tempRow.TempHuman = 9
Me.TempTableAdapter.Update(Me.DatabaseDataSet.Temp)'把窗体的数据保存
Me.TempTableAdapter.Update(tempRow)
Me.TempTableAdapter.UpdateTempHuman(9)'用设计器编辑中写了“UPDATE Temp SET TempHuman = ? ”
Me.TempTableAdapter.Update(5,4,0,0)'temp表就两个值,一个tempHuman,一个tempGift,原始为数字0
Catch ex As Exception
MessageBox.Show("Update Failed")
End Try