> I am trying to use JDBC to connect to an OpenOffice Database (hsqldb).
> When I try to run a query I get an error that says "Table not found in
[quoted text clipped - 18 lines]
>
> Mike

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
>> I am trying to use JDBC to connect to an OpenOffice Database (hsqldb).
>> When I try to run a query I get an error that says "Table not found in
[quoted text clipped - 22 lines]
>
> DriverManager.getConnection("jdbc:hsqldb:file:/home/username/project/whatever.odb","sa","");
Just to iterate..
[just add the database name at the end and not both the name.extension]
DriverManager.getConnection("jdbc:hsqldb:file:/home/username/project/DatabaseNameOnly","sa","");

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
mike - 24 Jan 2006 04:02 GMT
Nope, same problem. I made the above changes:
conn =
DriverManager.getConnection("jdbc:hsqldb:file:/home/user/project/DBName","sa","");
I do get in the "/home/user/project" directory DBName.log,
DBName.properties, and DBName.script files.
The log file is now empty. The first time I ran it, it had:
CREATE USER SA PASSWORD "" ADMIN
but then I ran it again, and it cleared it out.
The properties file looks fine. The script file has the following:
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 20
I have searched on the internet and found others with the same problem,
but I am yet to find a solution.
Thanks.
IchBin - 24 Jan 2006 09:36 GMT
> Nope, same problem. I made the above changes:
> conn =
[quoted text clipped - 17 lines]
>
> Thanks.
Well if your script file only has that information than there is no
table defined in that DB. That tells me that it just wrote the defaults
as if it was creating a new database. It will do that if it can not find
the database defined in initial jdbc connection string. It will just
create a new one based on that connect statement, automatically. This
would make sense with the error you said you where getting before as
Table not found.
Questions:
- When you created you Database under OpenOffice did you create just the
DB or create it and then create tables in it. If it created this
database with OpenOffice then where is this database you are trying to
connect to? It can't be the one from your jdbc statement.
WHAT type of tables do you have defined in that DB? That is, MEMORY,
CACHED or file..
Have you tested just using the runManager or the runManagerSwing?
If you created your DB under Openoffice then you can not have the
OpenOffice database design fronted opened against that db. You will have
to run the db under a hsqldb server. This changes your connection string
completely.
Problems like this are usually very simple. It USUALLY GET CONFUSING
because HSQLDB will create a database even if it is not the one you
think your connecting to. Also having OpenOffice, in the mix, and not
knowing HSQLDB makes for more confusion.
The best way to go about this, until you get a handle on it is to:
-Copy your DB, you created in OpenOffice, to a different subdirectory.
- Use either runManager or runManagerSwing to test you connection string
by hand. Inset data.. blabblabblab
- Once working translate that information to your program.

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)