小弟在做一个生成C#实体类的工具.
连接数据库的时候想功能比较强大些.
读取整个mssql数据库的所有数据库.这样的连接语法怎么写?谢谢
是连接整个mssql数据库.然后显示整个mssql数据库中的数据库名..
求连接Mssql的代码和mysql的代码..谢谢

解决方案 »

  1.   

    好像执行这样的.求助解释这个sql语句select name form sysdatabases where dbid>5 orde by dbid desc dbid>5是什么意思
      

  2.   

    贴一下Mysql的代码      MySQLConnection conn = null;            conn = new MySQLConnection(new MySQLConnectionString("localhost", "", "root", "root").AsString);            conn.Open();            string sql = "SHOW DATABASES";                        MySQLDataAdapter mda = new MySQLDataAdapter(sql, conn);            DataSet ds = new DataSet();            mda.Fill(ds, "table1");            this.dataGridView1.DataSource = ds.Tables["table1"];
      

  3.   

    C#的连接代码也会了帮忙解释这句就给分了..select name form sysdatabases where dbid>5 orde by dbid desc dbid>5是什么意思
      

  4.   

    字段dbid的值需要大于5,记录才会被选中。
      

  5.   

    dbid 1-5的都是系统db
    6以上才是用户建立的db
      

  6.   

    根据dbid作为条件判断语句,要求>5,并按照顺序排列