this.oleDbCommand1.CommandText = "INSERT INTO idx" +
"(id, password)" +
" VALUES ('" + textBox1.Text + " ', '" + textBox2.Text + " '); ";运行时候提示 into 语法错误
请问是哪错了 怎样改啊 谢谢!!~~~~
"(id, password)" +
" VALUES ('" + textBox1.Text + " ', '" + textBox2.Text + " '); ";运行时候提示 into 语法错误
请问是哪错了 怎样改啊 谢谢!!~~~~
" (id, password)" +
" VALUES ('" + textBox1.Text + " ', '" + textBox2.Text + " '); ";
这样
"(id, password)" +
" VALUES ('" + textBox1.Text + " ', '" + textBox2.Text + " '); ";
另外看下你的id字段是否是字符串类型 的..
"(id, password)" +
" VALUES ('" + textBox1.Text + " ', '" + textBox2.Text + " ')";
另外,ID一般是int型的吧,那么把VALUES('"+textBox1.Text+"'"改成VALUES("+textBox1.Text+",'"+textBox.Text...
this.oleDbCommand1.CommandText = "INSERT INTO idx (id,password) values('" +
textBox1.Text + "','" + textBox2.Text +"')";
这样试试吧,虽然少个分号,但基本没什么区别。
textBox1.Text + ",'" + textBox2.Text +"')";