Hello Stefan, I'm trying to use the code snippet you suggested but when I try to query the master table of the attached database I get and error with the following message: "SQL error: no such table: 'test.sqlite_master';
I am running the following queries: 1. "ATTACH DATABASE 'data\\test.db' AS test" - this seems to succeed (no error code). 2. "SELECT tbl_name FROM test.sqlite_master' WHERE type = 'table'" - this one is failing. Do you have any ideas? I tried looking at the docs but there doesn't seem to be much about it, from what I've read the queries appear to be correct. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Szomraky, Stefan Sent: Thursday, August 07, 2008 12:02 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Loading a existing database 100% into memory What do you mean by loading it into memory? If you want to dump the on-disk tables into memory and also want to check the memory footprint used for caching try this: Open the :memory: database and attach the on-disk database with ATTACH filename.db AS filename Then do a CREATE TABLE tableName AS SELECT * FROM filename.tableName On each table in the file, thus creating an in-memory copy of the DB and having done a select on each table (i.e. you'll see how much cache in memory will be used, etc.) You can enumerate all tables in a your on-disk-file in the mentioned scenario by doing a "SELECT tbl_name FROM filename.sqlite_master WHERE type = 'table'". Best regards, Stefan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users