HSQLDB:Tips and Tricks

From Apache OpenOffice Wiki
Revision as of 14:32, 14 April 2006 by 1145025391 (Talk | contribs)

Jump to: navigation, search

How to connect to a "normal" (not embedded) HSQL database?

  • Connect via JDBC
  • as driver class, use org.hsqldb.jdbcDriver
  • enter the URL to your HSQL database as described in the HSQLDB documentation, and append ;default_schema=true to the URL

How to migrate data between embedded and non-embedded HSQLDB?


How to know the version of the embedded HSQLDB?

You can determine the version of the embedded HSQLDB engine with the following Basic macro [oobas] Option Explicit

Sub hsqlVersion

Dim databaseURLOrRegisteredName As String
databaseURLOrRegisteredName = "hsqldb"
 ' adjust this string to your needs. It needs to be the name of a registered database,
 ' or a complete URL
Dim databaseContext As Object
databaseContext = createUnoService( "com.sun.star.sdb.DatabaseContext" )
Dim databaseDocument As Object
databaseDocument = databaseContext.getByName( databaseURLOrRegisteredName )
Dim connection As Object
connection = databaseDocument.getConnection( "", "" )
MsgBox "product version: " & connection.getMetaData().getDatabaseProductVersion()

End Sub Note that this will give you a version number such as "1.8.0", but not "". To my best knowledge, this last digit in the HSQLDB version cannot be obtained by any means at runtime.

[We are delicate. We do not delete your content.] [l_sp99] indoor tanning beds daybed comforter sets southwestern bedding leather sectional sofa thomasville bedding naturalizer shoes designer dog beds k1 visa fiancee visa rivotril cingular ringtone nail fungus bridesmaid dress formal prom dresses bcbg shoes tramadol hcl cingular ringtone bcbg shoes bridesmaid dress formal prom dresses nail fungus tanning bed bcbg shoes naturalizer shoes leather sectional sofa designer dog beds heated mattress pad bridesmaid dress 2006 prom dresses formal prom dresses sexy prom dresses cheap prom dresses nextel ringtone verizon ringtone cingular ringtone free sprint ringtone free nextel ringtone dianabol tribulus terrestris nutrex lipo 6 Tribex Xyience Vasopro caffeine pills scifit twinlab faxless payday loans

Personal tools