sql 存储过程实例----Select

来源:互联网 发布:珠江电视台直播软件 编辑:程序博客网 时间:2024/05/21 06:57
--存储过程create proc select_demoas select * from aa go 

 


 

 //调用方法            SqlCommand cmd = new SqlCommand("select_demo", conn);            cmd.CommandType = CommandType.StoredProcedure;            SqlDataAdapter da = new SqlDataAdapter(cmd);            DataSet ds = new DataSet();            da.Fill(ds, "info");            this.GridView1.DataSource = ds.Tables[0];            this.GridView1.DataBind();