用VB添加数据到SQL数据库的问题
Private Sub Command1_Click()
If text1.text<>"" and text2.text<>"" then
Adodc1.Recordset.Addnew
Adodc1.Recordset!patientID = Label5.Caption
Adodc1.Recordset!patientName = Text1.Text
Adodc1.Recordset!patientAge = Text2.Text
Adodc1.Recordset!patientSex = Combo2.Text
Adodc1.Recordset!registerOffice = Combo1.Text
Adodc1.Recordset!registerKind = Combo3.Text
Adodc1.Recordset!registerData = Format(Now, "yyyy年m月dd日")
Adodc1.Recordset.Update
Adodc1.Refresh
End If
End Sub
我想按 Command1后给数据库的一张表添加信息,但是上面的代码应该怎么改呢?帮忙看下,3Q!