麻烦看一下哪错了
string a= Session["username"].ToString();
SqlCommand Cm = new SqlCommand("SELECT * FROM Member WHERE Cid==a", Cn);
SqlDataReader Dr;
Dr = Cm.ExecuteReader(); //说是这儿('=' 附近有语法错误。)
------解决方案--------------------=只要1个。
------解决方案--------------------SqlCommand Cm = new SqlCommand("SELECT * FROM Member WHERE Cid = “ + a, Cn);
如果是Cid字符串
SqlCommand Cm = new SqlCommand("SELECT * FROM Member WHERE Cid = '“ + a + "'", Cn);
------解决方案--------------------
该回复于2014-04-19 09:40:33被管理员删除