/// <summary> /// Returns names of tables or views. /// </summary> /// <param name="ttype">must be 'BASE TABLE' or 'VIEW'</param> /// <returns>array of names</returns> public override object[] get_table_names(Idata.TableType ttype) { #if DEBUG if ((ttype != TableType.TABLE) && (ttype != TableType.VIEW) ) { throw new Error("table_type is wrong argument, must be 'BASE TABLE' or 'VIEW' "); } #endif System.Collections.ArrayList retval = null; IDataReader reader = null; string table_type; try { table_type = ttype == Idata.TableType.TABLE ? "BASE TABLE" : "VIEW"; reader = this.getReaderFor( "SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES " + "WHERE TABLE_TYPE = '" + table_type + "'"); retval = new System.Collections.ArrayList(); while (reader.Read()) { retval.Add(reader.GetValue(0).ToString()); } return(retval.ToArray()); } catch (Exception x) { throw new Error("AdoNet.get_table_names(" + ttype + ")", x); } finally { if (reader != null) { if (!reader.IsClosed) { reader.Close(); } } } }
public override object[] get_table_names(Idata.TableType ttype) { throw new fm.Error.NotImplemented(); }
/// <summary> /// Return all tables names from the underlying database. /// </summary> /// <param name="ttype">Idata.TableType</param> /// <returns>an array consisting of table types</returns> public abstract object[] get_table_names(Idata.TableType ttype);