.net调用存储过程问题
我使用了以下代码
SqlConnection mycon=new SqlConnection(con);
mycon.Open();
SqlCommand mycom=new SqlCommand("classno",mycon);
mycom.CommandType=CommandType.StoredProcedure;
mycom.Parameters.Add("@classnom",SqlDbType.VarChar);
string novalue = TextBox1.Text.Trim();
mycom.Parameters["@classnom"].Value = novalue;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = mycom;
DataSet ds = new DataSet();
da.Fill(ds,"bjb");
GridView1.DataSource=ds;
GridView1.DataBind();
mycon.Close();
存储过程如下,但是查不出结果
CREATE procedure classno
@classnom varchar
as
select * from bjb where 班级号=@classnom
GO
请各位指教,谢谢了