public DataSet DS()
{
string sql = @"select name from sysobjects where xtype='" + "U'";
SqlDataAdapter sda = new SqlDataAdapter(sql,Sc);
DataSet ds = new DataSet();
sda.Fill(ds);
foreach (DataRow dr in ds.Tables[0].Rows)
{
string tablename = @"select * from " + dr[0];
}
return ds;
}
这样再怎么做?注意是把数据库的多张表存进dataset里面,是多张表存进同一个dataset里面
代码如何写?
问题是如果100张表,你不能写100个sql语句的