1 Replies - 452 Views - Last Post: 17 January 2019 - 05:57 PM

#1 sayhello   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 159
  • Joined: 12-November 17

Base db does not run - it needs a hsqldb/jdbc/JDBCDriver

Posted 17 January 2019 - 04:28 PM

hello dear experts at Dreamincode,

first of all; am very very glad that i am here. This is just a great place.

this question is one that fits perfectly to this forum - this sup-borum.

well i have a base-db: it does not run well - it needs a hsqldb/jdbc/JDBCDriver

well i need to load this.


http://hsqldb.org/do...JDBCDriver.html

Quote

public class JDBCDriver
extends java.lang.Object
implements java.sql.Driver

but i get the errors - that tell me the db cannot be foundHow to set up the jdbc driver to connect to hsqldb from libreoffice?

    3) Connect a Base document to an existing JDBC database such as jdbc:hsqldb:file:/home/chenier/hsqldb/name;default_schema=true;shutdown=true;hsqldb.default_table_type=cached;get_column_name=false (again, "name" refers to your own file name prefix). This local single-user connection gives you much more than the embedded HSQLDB.
     
    4) Copy queries, forms and reports from the old database over to the new one.






how can i get the db up and running!?

Is This A Good Question/Topic? 0
  • +

Replies To: Base db does not run - it needs a hsqldb/jdbc/JDBCDriver

#2 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5360
  • View blog
  • Posts: 14,258
  • Joined: 18-April 07

Re: Base db does not run - it needs a hsqldb/jdbc/JDBCDriver

Posted 17 January 2019 - 05:57 PM

When it comes to getting a database connection up and running, in any language or technology, start with the simplest method possible and then once you get a connection, you can add the additional properties. So first I would setup a quick test framework

try {
    // Create database connection
    conn = DriverManager.getConnection(“jdbc:hsqldb:file:/home/chenier/hsqldb/name”, “<your_username>”, “<your_password>”); 
            
    System.out.println("Ok, this seems to work");
} catch (SQLException e) {
    System.err.println(e.getMessage());
} finally {
    try {
        // Close connection
        if (conn != null) 
            conn.close();
    } catch (SQLException e) {
        System.err.println(e.getMessage());
    }
}




This type of code will test using the most basic setup to try and connect to your file. If an error is encountered, it should then print out a message to the error stream and try to close the connection. Otherwise it will say that things seem to be working. Then of course if it doesn't work you can keep trying to play around with the parameters in the DeviceManager.getConnection method until you see something working for you.

I hope that helps. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1