예제 #1
0
        /// <summary>
        /// returns list of queries
        /// </summary>
        /// <returns></returns>
        public string[] QueryNames()
        {
            string          strAccessConn = GetConnectionString(filename);
            OleDbConnection conn          = new OleDbConnection(strAccessConn);

            conn.Open();
            DataTable schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);

            conn.Close();

            return(DataTableUtility.Strings(schemaTable, "TABLE_TYPE='VIEW'", "TABLE_name"));
        }
예제 #2
0
        /// <summary>
        /// returns list of tables
        /// </summary>
        /// <returns>array of strings</returns>
        public override string[] TableNames()
        {
            string strAccessConn = GetConnectionString(filename);

            OleDbConnection conn = new OleDbConnection(strAccessConn);

            conn.Open();
            DataTable tbl = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);

            conn.Close();
            return(DataTableUtility.Strings(tbl, "TABLE_TYPE='TABLE'", "TABLE_name"));
        }