ADO.NET的一个问题,请高手指点,急!!!!!!!!!!!!
string sql = null;
Conn.Open();
adminUser = "tianya ";
pwd = "123456 "
sql = "insert into YX_Manage (YX_AdminUser,YX_Pwd) values (@YX_AdminUser,@YX_Pwd) ";
SqlCommand Comm = new SqlCommand(sql, Conn);
Comm.Parameters.Add(new SqlParameter( "@YX_AminUser ", SqlDbType.VarChar, 50));
Comm.Parameters[ "@YX_AminUser "].Value = adminUser;
Comm.Parameters.Add(new SqlParameter( "@YX_Pwd ",SqlDbType.VarChar, 50));
Comm.Parameters[ "@YX_Pwd "].Value = pwd;
Comm.ExecuteNonQuery();
Conn.Close();
程序执行出错,必须声明变量 '@YX_AdminUser '。
请问到底是怎么回事啊!
------解决方案--------------------@YX_AdminUser
@YX_AminUser 不一样哦