[SQLiteJDBC] Help: Attach database

Andy Wilbourn awilbourn at gmail.com
Tue Jan 26 05:42:32 EST 2010


I figured this out, not sure if the past emails I sent went to the correct
forum. It seems you do you use the syntax ATTACH DATABASE, but only use
ATTACH '<file path and file>' AS <alias name>.

 

From: Andy Wilbourn [mailto:awilbourn at gmail.com] 
Sent: Monday, January 25, 2010 12:43 PM
To: sqlitejdbc-request at lists.hcoop.net
Cc: 'Andy Wilbourn'
Subject: RE: Help: Attach database

 

Here is a follow up. I do get an error when I try to run my query, but seems
it is suppressed to not give me any more detail.

 

All I get in NetBeans with a connection to the database is as follows if I
query an existing table:

Execution finished after 0.001 s, 1 error(s) occurred.

 

If I try to query a non-existing table I get the following error:

Error code 0, SQL state null: [SQLITE_ERROR] SQL error or missing database
(no such table: Raw.Membership1)

 

So it would seem it has attached the database, I just don't know what the
problem is when I try to query the second database.

 

From: Andy Wilbourn [mailto:awilbourn at gmail.com] 
Sent: Monday, January 25, 2010 8:45 AM
To: sqlitejdbc-request at lists.hcoop.net
Subject: Help: Attach database

 

I have been trying to use the SQLite ATTACH command and the JDBC works ok to
run the statement (no errors), but if I try to query data from the one
database to insert into another I get no data. If I use the plug-in for
Firefox to open a database and attach another I can get the data back, so it
is not a database issue of having no data.

 

Is there something I need to try, or is it not supported with this
implementation and I need to look for another?



More information about the SQLiteJDBC mailing list