c# 操作access错在那里? public void Add(memberModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into member("); strSql.Append("username,truename,password,gender,mobile,areaid"); strSql.Append(") values ("); strSql.Append("@username,@truename,@password,@gender,@mobile,@areaid"); strSql.Append(") ");
OleDbParameter[] parameters = { new OleDbParameter("@username", OleDbType.VarChar,30) , new OleDbParameter("@truename", OleDbType.VarChar,60) , new OleDbParameter("@password", OleDbType.VarChar,32) , new OleDbParameter("@gender", OleDbType.Integer,4) , new OleDbParameter("@mobile", OleDbType.VarChar,150) , new OleDbParameter("@areaid", OleDbType.VarChar,50)