Java JDBC HSQL Connection createConnection()

Here you can find the source of createConnection()

Description

create Connection

License

Open Source License

Declaration

public static Connection createConnection() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.sql.Connection;

import java.sql.DriverManager;

public class Main {
    public static Connection createConnection() {
        Connection result = null;
        try {/* w  w w . j a v  a2  s  . c  o m*/
            Class.forName("net.sourceforge.jtds.jdbc.Driver");
            result = DriverManager.getConnection(
                    "jdbc:hsqldb:hsql://127.0.0.1:9001/commons", "SA", "");
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return result;
    }
}

Related

  1. createHSQLDBConnection(String hsqldbName)
  2. createSchemasForHSQLDB(String dbName, String[] schemaNames)
  3. createTweetTable()
  4. getConnection()