好的我是新手,我不知道我在做什么,我真的需要帮助
Dim lnkr As New OleDbCommand(String.Format("insert into project (Student Name, Days Absent, Classes Absent, Arabic, Islamic, English, Math, Biology, Chemistry, Physic, Computer,Day Offs) values ('{0}',{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}", TextBox1.Text, TextBox10.Text, TextBox12.Text, TextBox2.Text, TextBox6.Text, TextBox3.Text, TextBox4.Text, TextBox7.Text, TextBox5.Text, TextBox9.Text, TextBox8.Text, TextBox11.Text))
lnkr.Connection = con
con.Open()
lnkr.ExecuteNonQuery()
con.Close()
答案 0 :(得分:0)
您错过了占位符{12}:
String.Format("insert into project ([Student Name], [Days Absent], [Classes Absent], Arabic, Islamic, English, Math, Biology, Chemistry, Physic, Computer, [Day Offs]) values ('{0}', {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}", TextBox1.Text, TextBox10.Text, TextBox12.Text, TextBox2.Text, TextBox6.Text, TextBox3.Text, TextBox4.Text, TextBox7.Text, TextBox5.Text, TextBox9.Text, TextBox8.Text, TextBox11.Text))
无法判断位置是否正确。