VARCHAR, custid) +']'as name from ht_cust where name like @City+'%' and EmpID =@EmpId"; cmd.Parameters.AddWithValue("@City", prefixText);
cmd.Parameters.AddWithValue("@EmpId&q
(@"Server=(local);Database=Test;Integrated Security=True;"); SqlCommand cmd= new SqlCommand("INSERT INTO Information(Info1,Info2) values(@Info1,@Info2)",con);
贝娄,我的代码非常好,而且工作正常,但是我想检查一下connec.reader.HasRows是否将用户重定向到page.aspx,然后弹出一条消息,上面写着“您还没有注册”。connec.SqlQuery("select * from manager where UserName='@username' AND Password='@password'");
connec.cmd.Parameters.AddWithValue("@username",