Re: [sqlite] ATTACH DATABASE question
Am Thu, 27 Sep 2012 20:31:36 -0700 schrieb john_prov...@yahoo.com: > I’m confused about how to attach a database file to an existing > database. I open my main database ok, then to attach the second > database, I try to execute the following SQL: > > ATTACH DATABASE ‘c:\mydata\my_attach_database.db’ AS ‘attached_db’ Use simple single quotes around the filename, and don't quote the alias name at all: ATTACH DATABASE 'c:\mydata\my_attach_database.db' AS attached_db; HTH, Wolfgang ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] ATTACH DATABASE question
john_prov...@yahoo.com wrote: > I’m confused about how to attach a database file to an existing database. I > open my main database ok, then to attach the second > database, I try to execute the following SQL: > > ATTACH DATABASE ‘c:\mydata\my_attach_database.db’ AS ‘attached_db’ > > Calling “SQLite3_Prepare_v2” on this statement returns SQLITE_OK, but calling > “SQLite3_Step” returns SQLITE_NOTADB This means that the file doesn't actually exist, or it does but its contents don't look like a valid SQLite database. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] ATTACH DATABASE question
I’m confused about how to attach a database file to an existing database. I open my main database ok, then to attach the second database, I try to execute the following SQL: ATTACH DATABASE ‘c:\mydata\my_attach_database.db’ AS ‘attached_db’ Calling “SQLite3_Prepare_v2” on this statement returns SQLITE_OK, but calling “SQLite3_Step” returns SQLITE_NOTADB, and so of course I can’t query the attached database at all. I think I’m missing a concept here. Thanks for any help with this. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users