Database 运行时错误';3061';。参数太少。预期1
我在MicrosoftAccess2010上有以下vb语句Database 运行时错误';3061';。参数太少。预期1,database,vb.net,ms-access,Database,Vb.net,Ms Access,我在MicrosoftAccess2010上有以下vb语句 CurrentDb.Execute "INSERT INTO Table3(Names,ID, center, village, association , BOD ) " & _ " VALUES(" & Me.fullnametxt & ",'" & Me.worktxt & "','" & _ Me.Combo39 & "','" & Me.assoctxt
CurrentDb.Execute "INSERT INTO Table3(Names,ID, center, village, association , BOD ) " & _
" VALUES(" & Me.fullnametxt & ",'" & Me.worktxt & "','" & _
Me.Combo39 & "','" & Me.assoctxt & "','" & Me.datetraintxt & "','" & Me.datetraintxt & "')"
它产生
运行时错误“3061”。参数太少。预期1
你错过了一些引语:
CurrentDb.Execute "INSERT INTO Table3 ( Names, ID, center, village, association , BOD ) " & _
" VALUES ('" & Me.fullnametxt & "','" & Me.worktxt & "','" & _
Me.Combo39 & "','" & Me.assoctxt & "','" & Me.datetraintxt & "','" & Me.datetraintxt & "')"
再仔细看看你的字符串,我会检查你的
“
在哪里。我还将研究参数,以帮助防止SQL注入。。。它还可以防止像您现在这样的错误:)