Ask Your Question
1

How do I display the HSQLDB Embedded version?

asked 2017-01-05 19:55:54 +0100

EasyTrieve gravatar image

updated 2017-01-05 20:10:32 +0100

How do I figure out which HSQLDB Embedded version is running inside my LO?

image description

It's not in Help | About.

Also, is "HSQDB" HyperSQL or Heidi SQL????

I'm running the latest LO version 5.2.3.3


Here's what I've learned so far...

== I suspect 5.2.3.3 is running an older version of HSQL because Tools | SQL... can't find this HSQL function:

 SELECT ROW_NUMBER() FROM ...

== There is a way to upgrade HSQL by splitting off the database best described here.

== I looked at this related question, but it fails to return an answer for me. Does this mean I have V 1.8? When I try the suggested solutions with Tools | SQL... here's what I get:

 SELECT * FROM "INFORMATION_SCHEMA"."SYSTEM_TABLES"

Executes successfully. But only returns something like this:

,INFORMATION_SCHEMA,SYSTEM_ALIASES,SYSTEM TABLE,the aliases defined within this database,,,,,,MEMORY,true,
,INFORMATION_SCHEMA,SYSTEM_ALLTYPEINFO,SYSTEM TABLE,a description of all non user-defined data types known to this database and the level of support for them in various capacities,,,,,,MEMORY,true,
,INFORMATION_SCHEMA,SYSTEM_AUTHORIZATIONS,SYSTEM TABLE,one row for each user and one row for each role ,,,,,,MEMORY,true,
etc...

SELECT * FROM "INFORMATION_SCHEMA"."SYSTEM_TABLE_CONSTRAINTS"

Executes successfully. But similarity only returns this:

,PUBLIC,SYS_FK_106,FOREIGN KEY,,PUBLIC,Products,NO,NO,
,PUBLIC,SYS_FK_161,FOREIGN KEY,,PUBLIC,Products,NO,NO,
,PUBLIC,SYS_FK_164,FOREIGN KEY,,PUBLIC,MediaContacts,NO,NO,
,PUBLIC,SYS_FK_180,FOREIGN KEY,,PUBLIC,Products,NO,NO,
,PUBLIC,SYS_PK_47,PRIMARY KEY,,PUBLIC,Products,NO,NO,
,PUBLIC,SYS_PK_49,PRIMARY KEY,,PUBLIC,Categories,NO,NO,
,PUBLIC,SYS_PK_51,PRIMARY KEY,,PUBLIC,MediaContacts,NO,NO,
,PUBLIC,SYS_PK_53,PRIMARY KEY,,PUBLIC,Companies,NO,NO,

SELECT * FROM "INFORMATION_SCHEMA"."TABLE_CONSTRAINTS";

Fails to execute: "Table not found"

SELECT * FROM "INFORMATION_SCHEMA"."SYSTEM_CHECK_CONSTRAINTS";

Executes successfully. But no results returned. ???


(Due to a bug in Ask.LibreOffice.org where code inside of a bulleted list does not display correctly, I used == rather than * for line prefixes above.)

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2017-01-05 21:14:30 +0100

Ratslinger gravatar image

If you're using an embedded DB it's version 1.8.0. That is all that is included in LO. AOO has a newer version. If you want to see for yourself, use the following macro:

Sub hsqlVersion
 Dim databaseURLOrRegisteredName As String
  ' adjust this string to your needs. It needs to be the name of a registered database,'
  ' or a complete URL'
 databaseURLOrRegisteredName = "YOUR-REGISTERED-DB-NAME-HERE"
  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()
 connection.close
End Sub

The DB must be registered. Also works on split DBs so you can see which version is installed in directory.

edit flag offensive delete link more

Comments

1

Hyper. Never heard of Heidi DB! Also, ROW_NUMBER() did work in HSQL v2.X but not v1.8.

Ratslinger gravatar imageRatslinger ( 2017-01-05 21:18:34 +0100 )edit

Just looked it up - HeidiSQL is a front end to a DB similar to SQL Workbench/J or MySQL workbench. It is NOT a DB.

Ratslinger gravatar imageRatslinger ( 2017-01-05 23:16:24 +0100 )edit

@Ratslinger, Thanks! So that's really amazing to me: the newest LO, 5.2.3.3 still uses the old HSQL v: 1.8.0. (BTW, for others: leave the .odb off of your filename to get your registered name above.)

EasyTrieve gravatar imageEasyTrieve ( 2017-01-06 04:06:35 +0100 )edit
0

answered 2017-01-06 00:08:03 +0100

peterwt gravatar image

I use HeidiSQL. It was previously known as MySQL-Front. It is a database management tool for MySQL, Microsoft SQL Server, and PostgreSQL databases. You can connect to local or remote servers.

edit flag offensive delete link more

Comments

@peterwt, thanks! Briefly, how does it compare to LO as a front end?

EasyTrieve gravatar imageEasyTrieve ( 2017-01-06 04:08:33 +0100 )edit

@EasyTrieve It is only a management tool similar to PHPMyAdmin. See here http://www.heidisql.com/ its free.

peterwt gravatar imagepeterwt ( 2017-01-06 18:09:15 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-01-05 19:55:54 +0100

Seen: 1,426 times

Last updated: Jan 06 '17