Esempio n. 1
0
        /// <summary>
        /// get all database name
        /// </summary>
        /// <returns></returns>
        public List <String> GetDatabaseName()
        {
            List <String> s = new List <String>();

            //数据库连接
            if (_connectionConfig.IsAutoCloseConnection == false)
            {
                if (_database.CheckStatus() == false)
                {
                    throw new Exception("databse connect not open");
                }
            }
            if (_connectionConfig.IsAutoCloseConnection == true)
            {
                _database.Open();
            }

            s = _database.GetDatabaseName();

            if (_connectionConfig.IsAutoCloseConnection == true)
            {
                _database.Close();
            }

            return(s);
        }