1 20 25 package com.nilostep.xlsql.jdbc; 26 27 import com.nilostep.xlsql.sql.*; 28 29 30 import java.sql.*; 31 32 33 38 public class xlConnectionHSQLDB extends xlConnection { 39 47 public xlConnectionHSQLDB(String url, String sql_url) 48 throws SQLException { 49 try { 50 w = xlSqlWriterFactory.create("hsqldb"); 51 URL = url; 52 dbCon = DriverManager.getConnection(sql_url); 53 query = xlSqlSelectFactory.create("hsqldb", dbCon); 54 startup(); 55 xlsql = xlSqlFactory.create("hsqldb", datastore, null); 57 } catch (Exception e) { 58 e.printStackTrace(); 59 throw new SQLException(e.getMessage()); 60 } 61 } 62 63 68 public void shutdown() throws Exception { 69 dbCon.close(); 70 closed = true; 71 } 72 } | Popular Tags |