hsqldb

Error in Querying Concatenation of 2 fields in LibreOffice Base SQL

喜欢而已 提交于 2019-12-11 18:58:59
问题 My apologies for wrong terminilogies, I am not actually a programmer, just a Base user confronted with a problem. I'm having trouble querying a column which is supposed to be a concatenation of two fields of two separate tables. I'm using LibreOffice Base Version 1:3.6.2 and it has the default HSQL engine. My two tables are as follows: Table 1 is named "Prefectures" and has the following fields: ID, "Prefecture Name" , and "State" Table 2 is named "Ward" and has the following fields: ID,

hsqldb: Encryption of an existing database?

℡╲_俬逩灬. 提交于 2019-12-11 17:30:28
问题 Do you know a method to encrypt an existing hsql database without loosing it contents? I want to use it afterwards with the jdbc url jdbc:hsqldb:file:<database path>;crypt_key=<key>;crypt_type=blowfish 回答1: The only way to do this is by modifying the code and building a special jar that reads the .script in clear text, but does all the writing with encryption. With the normal jar, execute SHUTDOWN SCRIPT on the existing database to turn it into a .script file. Modify org.hsqldb.persist.Log

HSQLDB delete row(s) from JDBC resultset

和自甴很熟 提交于 2019-12-11 13:52:15
问题 I have run into a couple of problems while trying to convert an existing JDBC application to use HSQLDB version 2.2.9 (Currently the codebase runs successfully on MySQL, ORACLE and SQLServer, but an embedded database seemed like a good option too). I will ask the questions one at a time and separately (although they all relate to the JDBC ResultSet.deleteRow() method, supported since HSQLDB 2.0) Why does rs.next() return false after calling rs.deleteRow() ? Here is a complete self contained

Failed to connect hypersonic(HSQLDB) DB on Apache 7.0

寵の児 提交于 2019-12-11 10:54:18
问题 I have a project in Eclipse which is defined as 'Dynamic web project' on Apache-Tomcat 7.0 server. I need to connect to hypersonic DB (HSQLDB) in some of my Java classses. The code which i'm trying to make is very simple: private Connection getConnection(){ Connection conn; try { Class.forName("org.hsqldb.jdbcDriver"); conn = driverManager.getConnection("jdbc:hsqldb:hsql://localhost","sa",""); return conn; } catch (Exception e) { e.printStackTrace(); } return null; } I already added hsqldb

Testing date values with HSQLDB

三世轮回 提交于 2019-12-11 10:11:36
问题 We use SQLServer in production, but HSQLDB for our integration tests. HSQLDB is used because it's an in-memory database. I have an SQLServer SQL that executes the following code: select convert(varchar(8), pos_val_date, 112) from wscpos; In HSQLDB, this does not work. The code should be: select to_char( pos_val_date, 'YYYYMMDD') from wscpos; What's the best practice to adapt my code such that it runs both in production and in my integration test? 回答1: If you are inclined to change your DB for

HSQL & Hibernate: unsupported internal operation: Session

橙三吉。 提交于 2019-12-11 08:58:11
问题 I have a project with the following dependencies: hibernate-entitymanager-4.1.8 hsql-2.2.8 I have a Persistence Unit including: <properties> <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> </properties> And an Entity with a field

Calling HSQLDB IDENTITY function with CallableStatement to get output

给你一囗甜甜゛ 提交于 2019-12-11 07:55:58
问题 I'm trying to use CallableStatements to get the value of IDENTITY() in HSQLDB from Java JDBC. I can prepareCall fine. The issue is with registerOutputParameter. I get "parameter index out of range" no matter what index I pass in. I've tried SQL snippets like "{? = CALL IDENTITY()}" with no luck. Any clues? Am I completely off track in how to invoke HSQLDB function routines from JDBC? 回答1: Instead of using IDENTITY() , use getGeneratedKeys() to retrieve any keys generated by the (insert)

How to check if connection pool is used

江枫思渺然 提交于 2019-12-11 06:34:14
问题 I use HSQLDB + EclipseLink + Gemini on OSGI framework (Felix). In spite that I've set pool in persistence.xml I have serious suspicious that connection pool is not used and for every request a new connection is created. How can I check on HSQLDB side if conection pool is used. EDIT 1 I start my application with -Dhsqldb.reconfig_logging=false . To start HSQLDB server in my application I use the following code p.setProperty("server.database.0", "file:"+dataBasePath); p.setProperty("server

OpenJPA HSQLdb - how to handle IDs

为君一笑 提交于 2019-12-11 06:28:55
问题 I'm having trouble handling IDs of my databse tables using OpenJPA and HSQLdb. I created an Abstract class where I handle annotations and stuff to remap into the DB: // Property accessors @Id @Column(name = "IDTESTOBJEKT", unique = true, nullable = false) public Integer getIdtestobjekt() { return this.idtestobjekt; } public void setIdtestobjekt(Integer idtestobjekt) { this.idtestobjekt = idtestobjekt; } It's as a Facade used to create Testobjekts. Testobjekt test_obj = new Testobjekt(); test

How to start HSQLDB in server mode from Spring boot application

落爺英雄遲暮 提交于 2019-12-11 05:14:57
问题 I have a Spring boot application, running with jpa data and hsqldb 2.3.3 (in Centos 7), the application runs fine but I would like to use HSQLDB database manager to check the data status, however it failed: application.properties: spring.datasource.url=jdbc:hsqldb:mem:testdb spring.datasource.username=sa spring.datasource.password= spring.jpa.database-platform=org.hibernate.dialect.HSQLDialect spring.jpa.show-sql=true spring.jpa.hibernate.ddl-auto=create Command to start HSQLDB: java -cp