string Sqlstr = "select id,Name from Test";
SqlDataAdapter da = new SqlDataAdapter(Sqlstr,conn);
DataSet ds = new DataSet();
da.Fill(ds, "ds");
Object[][] values;
values = new Object[ds.Tables["ds"].Rows.Count][];  
int index = 0;
foreach(DataRow row in ds.Tables["ds"].Rows)  
{   
   values[index++] = row.ItemArray;  
}
posted on 2007-12-06 11:11  GFSov  阅读(419)  评论(1编辑  收藏  举报