Пример #1
0
        /// <summary>List the tables in a SQLITE database</summary>
        /// <param name="dbName">Database file name</param>
        /// <returns>Array of database table names</returns>  
        /// <exception cref="System.ArgumentException">Throws an exception if dbName is not supplied</exception>
        public static String[] DBTables(String dbName)
        {
            //Tidy up input parameters
            dbName = dbName.Trim();

            //Fail if dbName not passed in
            if (dbName == String.Empty)
                throw new ArgumentException("database name required", "dbName");

            //Get the list of table names for the specified database
            DBEngineBase db = new SQLiteDBEngine(dbName);
            return db.tables();
        }