C#422-研究生管理信息系统,OleDbDataReader rd;
string sql;
sql="select MName from majorinfo";
oleCommand1.CommandText=sql;
oleConnection1.Open();
rd=oleCommand1.ExecuteReader();
while (rd.Read())
{
TreeNode node=new TreeNode();
node.Text=rd.GetString(0).ToString();
treeView1.Nodes.Add(node);
}
rd.Close();
oleConnection1.Close();
1