0

I created the jdbc connection successfully for hsqldb in stanlone mode.I found where the new database is created.Using the path of newly created database in runserver ,I created some tables.But when I tried to get those table using jdbc connection,I could not get those table. connection url is:"jdbc:hsqldb:file:databasename;ifexist=true","SA","" for getting tables I m using the following query.

"select table_name from information_schema.system_tables where table_type='table'";

I am using hsqldb 2.2.7.

Anu
  • 405
  • 1
  • 4
  • 16
  • A code snippet would help us understand your question. What do you mean by "...I could not get those table."? No records, an exception thrown, other? – Jeff Miller Mar 20 '12 at 14:45

1 Answers1

1

You seem to be trying to access the database simultaneously via Server and in-process. This is not possible. After each type of access, you need to shutdown the database before you connect to it via the alternative type of access. Therefore shutdown the Server once you have created the tables, then connect to the database in-process.

It is easier to access the database via Server only, and avoid such problems. Please also upgrade to version 2.2.8 to avoid a bug which may affect a database that has not been shutdown properly.

fredt
  • 24,044
  • 3
  • 40
  • 61
  • I am using in-process mode,so didnt open server.I used runMamager.bat for creating tables and then execute shutdown command.After that I tried to get those tables from my java program using jdbc connection.I got why I m not getting those tables.Because,rummanager created tables in standlone mode as temporarily,so after executing the shutdown all tables which I created gone. – Anu Mar 21 '12 at 04:12
  • I tried with server mode connection by following instruction http://stackoverflow.com/questions/7053721/concept-of-in-memory-database-and-how-to-see-if-my-data-is-being-populated-in-hs and now it is working fine – Anu Mar 21 '12 at 12:33