往ACCESS 增加用户名和密码 的问题??(已解决)
string connEmpl = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + "employee.mdb";myConnection = new OleDbConnection(connEmpl);
myConnection.Open();
string insertCmd = "Insert Into syadmin(username,password) Values('" + textBoxUsername.Text + "','" + textBoxPassword.Text + "')";
OleDbCommand cmd;
cmd = new OleDbCommand(insertCmd, myConnection);
cmd.ExecuteNonQuery();
myConnection.Close();
是上面的程序,往数据里添加用户名和密码,但运行程序的时候说"Syntax error in INSERT INTO statment.", 说是我的句法有错误.大家帮我看一下是哪错了? 谢谢^
[ 本帖最后由 twb_twb 于 2009-9-16 14:55 编辑 ]