Private Sub Command1_Click()
Adodc5.Recordset.AddNew
Adodc5.Recordset("jinchenghao") = Text8.Text
Adodc5.Recordset("yunxingtime") = Text9.Text
Adodc5.Recordset("shebei1") = Combo4.Text
Adodc5.Recordset("number1") = Text10.Text
Adodc5.Recordset("shebei2") = Combo5.Text
Adodc5.Recordset("number2") = Text11.Text
Adodc5.Recordset("shebei3") = Combo6.Text
Adodc5.Recordset("number3") = Text12.Text
Adodc5.Recordset("jczhuangtai") = 0
Adodc5.Recordset.Update
MsgBox "添加进程完毕", vbExclamation, "提示信息"
End Sub
代码如上,在sql表中从shebei2开始到number3都可以取空值,在执行时,我没有向从combo5到text12赋值(空着框),shebei为char类型值,text为int类型值,text11那行出错,若是把combo5和text11赋值,后面不赋值,text12那行出错,都是一个错误,是不是类型转换不进sql表啊?如何修改?