/// <summary> /// 获得默认库中所有的表名 /// </summary> /// <returns></returns> public List <string> GetTablesName() { mydb.ChangeDatabase("system"); string dbfile = "select name from tables where database='default'"; var dt = GetDataFromTable(dbfile); List <string> listtablename = new List <string>(); for (int i = 0; i < dt.Rows.Count; i++) { string tablename = dt.Rows[i]["name"].ToString(); if (!listtablename.Contains(tablename)) { listtablename.Add(dt.Rows[i]["name"].ToString()); } } return(listtablename); }
public void SelectDB(string dbname) { mydb.ChangeDatabase(dbname); }