提示insert into 语法错误?
哪错了?
public void insertUser(string username,string userpwd,string userqq,string useremail)
{
OleDbConnection conn=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Inetpub\\wwwroot\\bbs\\mydata.mdb");
OleDbCommand cmd=new OleDbCommand("insert into user(UserName,UserPwd,UserQQ,UserEmail)Values(@username,@userpwd,@userqq,@useremail)",conn);
conn.Open();
cmd.Parameters.Add(new OleDbParameter("@username",OleDbType.LongVarChar,50));
cmd.Parameters["@username"].Value=username;
cmd.Parameters.Add(new OleDbParameter("@userpwd",OleDbType.LongVarChar,50));
cmd.Parameters["@userpwd"].Value=userpwd;
cmd.Parameters.Add(new OleDbParameter("@userqq",OleDbType.LongVarChar,50));
cmd.Parameters["@userqq"].Value=userqq;
cmd.Parameters.Add(new OleDbParameter("@useremail",OleDbType.LongVarChar,50));
cmd.Parameters["@useremail"].Value=useremail;
cmd.ExecuteNonQuery();
conn.Close();
}