using (myConn = new SqlConnection(m_strConnectionString))
{
myConn.Open();
using (SqlCommand myCommand1 = new SqlCommand(strSql, myConn))
{
using (SqlDataAdapter myAdp = new SqlDataAdapter(myCommand1))
{
ds = new DataSet();
myAdp.Fill(ds, "RichMoney");
this.GridView1.DataSource = ds;
this.GridView1.DataBind();
//第一次運用
strSql = " select * from first ";
myCommand1.CommandText = strSql;
ds = new DataSet();
myAdp.Fill(ds, "RichMoney");
//第二次運用
strSql = " select * from second ";
myCommand1.CommandText = strSql;
ds1 = new DataSet();
myAdp.Fill(ds1, "RichMoney");
}
}
}
留言
張貼留言
您好,我是 Lawrence,這裡是我的開發筆記的網誌,如果你對我的文章有任何疑問或者有錯誤的話,歡迎留言讓我知道。