VB中出现 查询值的数目与目标字段中的数目不同 求解决
DimrsAsNewADODB.RecordsetDimsqlAsStringDimconnAsADODB.ConnectionSetconn=NewADODB.Conn...
Dim rs As New ADODB.Recordset
Dim sql As String
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=J:\点菜系统作业\yinyongheng\biao\dcxtb.mdb"
Set rs = New ADODB.Recordset
sql = "insert into krb (房间号,就餐日期,菜名1,菜名2,菜名3,菜名4) values('" & Text5.Text & "','" & Text6.Text & "''" & Text7.Text & "','" & Text8.Text & "','" & Text9.Text & "','" & Text10.Text & "')"
conn.Execute sql 展开
Dim sql As String
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=J:\点菜系统作业\yinyongheng\biao\dcxtb.mdb"
Set rs = New ADODB.Recordset
sql = "insert into krb (房间号,就餐日期,菜名1,菜名2,菜名3,菜名4) values('" & Text5.Text & "','" & Text6.Text & "''" & Text7.Text & "','" & Text8.Text & "','" & Text9.Text & "','" & Text10.Text & "')"
conn.Execute sql 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询