Visual Basic 2010:如何将这两个值放在数据库的同一行?
按钮1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim rst As ADODB.Recordset
rst = opentable("Select * from timesheet", ADODB.CursorLocationEnum.adUseServer)
With rst
.AddNew()
.Fields("time1").Value = Date.Now
.Update()
MsgBox("Time in")
End With
End Sub
按钮2
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim rst As ADODB.Recordset
rst = opentable("Select * from timesheet", ADODB.CursorLocationEnum.adUseServer)
With rst
.AddNew()
.Fields("time2").Value = Date.Now
.Update()
MsgBox("Time Out")
End With
End Sub