存儲過程
Create Procedure MoreTable
As
Select User_Name From Physical_Users
Select Order_Number From ProductOrders
cs代碼
DataSet ds = new DataSet();
SqlConnection conn = new SqlConnection(ConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "MoreTable";
cmd.Connection = conn;
SqlDataAdapter sdp = new SqlDataAdapter(cmd);
sdp.Fill(ds);
GridView1.DataSource = ds.Tables[0];
GridView2.DataSource = ds.Tables[1];
GridView1.DataBind();
GridView2.DataBind();
用ds.tables.count来访问这个dataset中有多少个表
xx




cs代碼













用ds.tables.count来访问这个dataset中有多少个表
xx