get hsqldb Connection - Java JDBC

Java examples for JDBC:Connection

Description

get hsqldb Connection

Demo Code


//package com.java2s;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Main {
    public static final String CONN_STR = "jdbc:hsqldb:hsql://localhost/stocks";

    public static Connection getConnection() throws SQLException {
        return DriverManager.getConnection(CONN_STR, "SA", "");
    }/*  w  w  w  .  j a va 2 s  .  com*/
}

Related Tutorials