首页 > 代码库 > 有parameters

有parameters

技术分享
1   StringBuilder strSql = new StringBuilder();
2             strSql.Append("select count(1) from Table_Teacher");
3             strSql.Append(" where IdentityCard=@IdentityCard AND TeaStatus=‘1‘");
4             SqlParameter[] parameters = {
5                     new SqlParameter("@IdentityCard", SqlDbType.NVarChar,18)
6 };
7             parameters[0].Value =http://www.mamicode.com/ IdentityCard;
8 
9             return DbHelperSQL.Exists(strSql.ToString(), parameters);
View Code

 

有parameters