SqlConnection cn = new SqlConnection(app);
SqlCommand cmd = cn.CreateCommand();
cmd.CommandText = "select * from Accountnumber where name='admin'";
cmd.CommandType = CommandType.Text;
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataTable dt = new DataTable();
da.Fill(ds,"student");
da.Fill(dt);
MessageBox.Show(ds.Tables[1].Columns.ToString());
把tables[1]修改為tables[0]看看