예제 #1
0
        internal override void LoadAll()
        {
            try
            {
                string name = "";

                // test


                // test

                // We add our one and only Database
                IDbConnection conn = MySqlDatabases.CreateConnection(this.dbRoot.ConnectionString);
                conn.Open();
                name = conn.Database;
                conn.Close();
                conn.Dispose();

                MySqlDatabase database = (MySqlDatabase)this.dbRoot.ClassFactory.CreateDatabase();
                database._name     = name;
                database.dbRoot    = this.dbRoot;
                database.Databases = this;
                this._array.Add(database);

                try
                {
                    DataTable     metaData = new DataTable();
                    DbDataAdapter adapter  = MySqlDatabases.CreateAdapter("SELECT VERSION()", this.dbRoot.ConnectionString);

                    adapter.Fill(metaData);

                    this.Version = metaData.Rows[0][0] as string;
                }
                catch {}
            }
            catch {}
        }
예제 #2
0
 public System.Data.IDbConnection CreateConnection()
 {
     return(MySqlDatabases.CreateConnection(""));
 }