【求助】读取数据问题
程序代码:
Private Sub btnSaveToDb_Click() Dim i As Integer Dim ii As Integer Dim j As Integer On Error GoTo myErr Con.BeginTrans j = grdRunData.Rows grdRunData.TextMatrix(1, 3) = DTPicker1.Value grdRunData.TextMatrix(1, 4) = DateAdd("s", 900, DTPicker1.Value) For i = 2 To j - 1 grdRunData.TextMatrix(i, 3) = DateAdd("s", 5, grdRunData.TextMatrix(i - 1, 3)) grdRunData.TextMatrix(i, 4) = DateAdd("s", 5, grdRunData.TextMatrix(i - 1, 4)) Next i With grdRunData i = 1 Dim sql As String sql = "delete from recordTable where recordnum='" & txtRecordNum.Text & "'" Con.Execute (sql) For i = 1 To .Rows - 1 sql = "INSERT INTO recordTable " & _ "(recordtime,recordnum,recordpeple,method,projname,concentration,analyseid,addbactime,recordbactime,lightvolume,relativevolume,mean,inhibition,notes,idnum) " & _ " VALUES (" & _ "'" & lblRecDT.Caption & "', " & _ "'" & txtRecordNum.Text & "', " & _ "'" & txtRecordPeople.Text & "', " & _ "'" & txtRecordMethod.Text & "', " & _ "'" & Text1.Text & "', " & _ "'" & .TextMatrix(i, 1) & "', " & _ "'" & .TextMatrix(i, 2) & "', " & _ "'" & .TextMatrix(i, 3) & "', " & _ "'" & .TextMatrix(i, 4) & "', " & _ "'" & .TextMatrix(i, 5) & "', " & _ "'" & .TextMatrix(i, 6) & "', " & _ "'" & .TextMatrix(i, 7) & "', " & _ "'" & .TextMatrix(i, 8) & "', " & _ "'" & .TextMatrix(i, 9) & "', " & _ "'" & .TextMatrix(i, 0) & _ "')"
为什么第三列和第四列没有时间显示,