存储过程返回表问题
方法public static void woako(DataList dls)
{
string conn = System.Configuration.ConfigurationManager.AppSettings["wokao"];
SqlConnection con = new SqlConnection(conn);
SqlCommand com = new SqlCommand("wokao", con);
try
{
con.Open();
= CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(com);
DataSet ds = new DataSet();
da.Fill(ds);
dls.DataSource = ds.Tables[0];
con.Close();
}
存储过程
create procedure wokao --执行查询
as
select * from Blog
return
加载
protected void Page_Load(object sender, EventArgs e)
{
DB.woako(this.DataList1);
this.DataList1.DataBind();
}
数据库有数据,问题是运行了无数据显示,帮个忙,3Q