public override XsdDataBaseObjects.dbschemaDataTable GetDataBaseSchemas(string nFilter)
        {
            try
            {
                var schemas = new XsdDataBaseObjects.dbschemaDataTable();

                string sql = @"SELECT c.table_catalog, c.table_schema FROM information_schema.tables c" + ControlChars.CrLf +
                            "WHERE c.table_schema NOT IN('information_schema', 'pg_catalog')" + ControlChars.CrLf +
                            "ORDER BY c.table_schema";

                DataTable table = ExecuteQueryGet(sql);

                for (int i = 0; i < table.Rows.Count; i++)
                {
                    DataRow row = table.Rows[i];
                    schemas.AdddbschemaRow(row["table_catalog"].ToString(), row["table_schema"].ToString());
                }
                return schemas;
            }
            catch (Exception ex)
            {
                throw new Exception("No fue posible obtener el listado de tablas " + base.Connection.DataSource + " , " + ex.Message, ex);
            }
        }
Exemple #2
0
        public override XsdDataBaseObjects.dbschemaDataTable GetDataBaseSchemas(string nFilter)
        {
            try
            {
                var schemas = new XsdDataBaseObjects.dbschemaDataTable();

                string sql = @"SELECT '' AS table_catalog, 'No implementado' AS table_schema FROM dual";

                DataTable table = ExecuteQueryGet(sql);

                for (int i = 0; i < table.Rows.Count; i++)
                {
                    DataRow row = table.Rows[i];
                    schemas.AdddbschemaRow(row["table_catalog"].ToString(), row["table_schema"].ToString());
                }
                return schemas;
            }
            catch (Exception ex)
            {
                throw new Exception("No fue posible obtener el listado de tablas " + base.Connection.DataSource + " , " + ex.Message, ex);
            }
        }