Beispiel #1
0
        override internal void LoadAll()
        {
            try
            {
                VistaDBDatabase db = (VistaDBDatabase)this.Database;

                DataTable metaData = db._mh.LoadTables(this.dbRoot.ConnectionString);

                PopulateArray(metaData);
            }
            catch {}
        }
Beispiel #2
0
        internal override void LoadAll()
        {
            try
            {
                MetaHelper mh     = new MetaHelper();
                string     dbName = mh.LoadDatabases(this.dbRoot.ConnectionString);

                VistaDBDatabase database = (VistaDBDatabase)this.dbRoot.ClassFactory.CreateDatabase();

                database._name     = dbName;
                database.dbRoot    = this.dbRoot;
                database.Databases = this;

                this._array.Add(database);
            }
            catch {}
        }
Beispiel #3
0
        override internal void LoadForTable()
        {
            try
            {
                VistaDBDatabase db = (VistaDBDatabase)this.Table.Database;

                DataTable metaData = db._mh.LoadColumns(this.dbRoot.ConnectionString, this.Table.Name);

                f_TypeName     = metaData.Columns["DATA_TYPE_NAME"];
                f_InPrimaryKey = metaData.Columns["IS_PRIMARY_KEY"];

                PopulateArray(metaData);
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
        }
Beispiel #4
0
        override internal void LoadAll()
        {
            try
            {
                VistaDBDatabase db = (VistaDBDatabase)this.Table.Database;

                if (!db._FKsInLoad)
                {
                    db._FKsInLoad = true;

                    VistaDBForeignKeys fks = null;

                    foreach (Table table in this.Table.Tables)
                    {
                        fks = table.ForeignKeys as VistaDBForeignKeys;
                    }

                    DataTable metaData = db._mh.LoadForeignKeys(this.dbRoot.ConnectionString, this.Table.Database.Name, this.Table.Name);

                    PopulateArray(metaData);

                    ITables tables = this.Table.Tables;
                    for (int i = 0; i < tables.Count; i++)
                    {
                        ITable table = tables[i];
                        fks = table.ForeignKeys as VistaDBForeignKeys;
                        fks.AddTheOtherHalf();
                    }

                    db._FKsInLoad = false;
                }
                else
                {
                    DataTable metaData = db._mh.LoadForeignKeys(this.dbRoot.ConnectionString, this.Table.Database.Name, this.Table.Name);

                    PopulateArray(metaData);
                }
            }
            catch {}
        }