存储过程调用问题
代码string con = "Data Source=PC-200902211357\\SQLEXPRESS;Integrated Security=true;Initial Catalog=users";
scn = new SqlConnection(con);
scm.CommandText = "proc_name";
scm.CommandType = CommandType.StoredProcedure;
scm.Connection = scn;
SqlParameter prmType = new SqlParameter();
prmType.ParameterName = "@a";
prmType.SqlDbType = SqlDbType.VarChar;
prmType.Value = this.textBox1.Text;
scm.Parameters.Add(prmType);
SqlParameter prmType1 = new SqlParameter();
prmType1.ParameterName = "@b";
prmType1.SqlDbType = SqlDbType.VarChar;
prmType1.Value = this.textBox2.Text;
scm.Parameters.Add(prmType1);
sdr = scm.ExecuteReader();
scm.CommandText = "proc_name";出现未将对象引用设置到对象的实例错误 --------------------编程问答-------------------- scm是空对象呗
补充:.NET技术 , C#