Java JDBC Derby Connection getDerbyDatabaseProperty(Statement derbyStatementForQuerying, String propertyKey)

Here you can find the source of getDerbyDatabaseProperty(Statement derbyStatementForQuerying, String propertyKey)

Description

get Derby Database Property

License

Open Source License

Declaration

public static String getDerbyDatabaseProperty(Statement derbyStatementForQuerying, String propertyKey)
            throws SQLException 

Method Source Code

//package com.java2s;
/*// w w  w  .  ja v a2 s . c o  m
 * (C) Copyright IBM Corp. 2008
 *
 * LICENSE: Eclipse Public License v1.0
 * http://www.eclipse.org/legal/epl-v10.html
 */

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Main {
    public static String getDerbyDatabaseProperty(Statement derbyStatementForQuerying, String propertyKey)
            throws SQLException {
        ResultSet rs = derbyStatementForQuerying
                .executeQuery("VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('" + propertyKey + "')");
        try {
            return rs.next() ? rs.getString(1) : null;
        } finally {
            rs.close();
        }
    }
}

Related

  1. getConnection()
  2. getConnection()
  3. getDatabaseConnection()
  4. getDefaultDerbyConnection()
  5. getDerbyConnection(String filename)
  6. getDerbyUnitConnection()
  7. getDriver(String className)
  8. getLocalConnection()
  9. getRowsFromDatabase(Connection con, int numberOfRows, boolean reuseConnection, String driver, String dsn, String user, String password, String tableName, String whereString, String orderByString, String groupByString)