for (int i = 0; i < temp.Length; i++){sb.Append(temp[i]);}comm.CommandText = sb.ToString();}}if (comm.Connection.State != ConnectionState.Open){comm.Connection.Open();}return comm.ExecuteReader(CommandBehavior.CloseConnection);}调用的时候类似:ExecuteReaderParams(comm, "select * from xx where id=? and name=?",id,name);------解决方案--------------------------------------------------------如果是多条件查询的话存储过程里面就一个参数就够了这个参数是不定条件查询语句
温馨提示:内容为网友见解,仅供参考