DataSet ds = new DataSet();
OleDbCommand cm = new OleDbCommand();
cm.CommandText = "select * from topic";
OleDbDataAdapter Adapter = new OleDbDataAdapter();
Adapter.SelectCommand = cm;
Adapter.Fill(ds);
if (ds.Tables.Rows[0][0] > 0)
{
Datalist1.DataSource = ds.Tables[0].DefaultView;
Datalist1.DataBind();
DataSet ds1=new DataSet();
OleDbCommand cm1=new OleDbCommand();
cm1.CommandText="select * from message where id=" + ds.Tables[0].Rows[0][0];
OleDbDataAdapter Adapter1 = new OleDbDataAdapter();
Adapter.SelectCommand = cm1;
Adapter.Fill(ds1);
if (ds1.Tables.Rows[0][0]>0)
{
Datalist2.DataSource = ds1.Tables[0].DefaultView;
Datalist2.DataBind();
} }
else
{
Response.Write("<script>alert('gggggggggg')</script>");
}
OleDbCommand cm = new OleDbCommand();
cm.CommandText = "select * from topic";
OleDbDataAdapter Adapter = new OleDbDataAdapter();
Adapter.SelectCommand = cm;
Adapter.Fill(ds);
if (ds.Tables.Rows[0][0] > 0)
{
Datalist1.DataSource = ds.Tables[0].DefaultView;
Datalist1.DataBind();
DataSet ds1=new DataSet();
OleDbCommand cm1=new OleDbCommand();
cm1.CommandText="select * from message where id=" + ds.Tables[0].Rows[0][0];
OleDbDataAdapter Adapter1 = new OleDbDataAdapter();
Adapter.SelectCommand = cm1;
Adapter.Fill(ds1);
if (ds1.Tables.Rows[0][0]>0)
{
Datalist2.DataSource = ds1.Tables[0].DefaultView;
Datalist2.DataBind();
} }
else
{
Response.Write("<script>alert('gggggggggg')</script>");
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货