Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database 运行时错误';3061';。参数太少。预期1_Database_Vb.net_Ms Access - Fatal编程技术网

Database 运行时错误';3061';。参数太少。预期1

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

我在MicrosoftAccess2010上有以下vb语句

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注入。。。它还可以防止像您现在这样的错误:)