jdbc

Calling an Oracle PL/SQL procedure in Java using a CallableStatement with a boolean IN parameter gives an PLS-00306 oracle error:

﹥>﹥吖頭↗ 提交于 2020-12-02 06:32:26
问题 I have a pl/sql procedure on an Oracle 11g that has the following parameters: PROCEDURE validate_product ( product_id_in IN varchar2 , username_in in varchar2, source_in varchar2, source_id_in varchar2 , isEuProduct in boolean , error_code out varchar2, product_type out varchar2 ) I am trying to call the above stored procedure from within java using the following code: cstmt = getConnection().prepareCall("begin " + DBUtil.SCHEMANAME + ".PRODUCT_UTILITIES.validate_product(:1,:2,:3,:4,:5,:6,:7)

Oracle JDBC DriverManager.getConnection() hangs

回眸只為那壹抹淺笑 提交于 2020-11-29 10:59:50
问题 We have several servers that each run an Oracle database 11g Release 11.2.0.1.0 - 64bit. We are connecting via JDBC like this: public Connection createConnection(String drvClass, String connURL, String user, String pass) throws ClassNotFoundException, SQLException { Class.forName(drvClass); Connection conn = DriverManager.getConnection(connURL, user, pass); for (SQLWarning warn = conn.getWarnings(); warn != null; warn = warn.getNextWarning()) { System.out.println("SQL Warning:"); System.out

Java: Connect to MS-Access Database (mdb or mde)

风格不统一 提交于 2020-11-27 04:25:48
问题 I am trying to connect to MS-Access using JDBC:ODBC: public boolean connectToAccess(String accessFilePath) { //Get connection to database try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); myConnection = DriverManager.getConnection("jdbc: odbc: driver={Microsoft Access Driver (*.mdb)};DBQ=" + accessFilePath); } catch (Exception ex) { System.out.println(ex); return false; } return true; } I get the error: "No suitable driver found for jdbc: odbc: driver={Microsoft Access Driver (*.mdb)};DBQ

Jdbc connection error from Google Apps Script

好久不见. 提交于 2020-11-27 00:30:17
问题 I have created a Google Cloud Project MySQL database to use in conjunction with the Jdbc service provided by Google Apps Script. Everything went as planned with the connection. I am basically connecting as it does in the docs. var conn = Jdbc.getCloudSqlConnection(dbUrl, user, userPwd); I shared the file with another account and all of a sudden I am seeing a red error saying: 'Failed to establish a database connection. Check connection string, username and password.' Nothing changed in the

Jdbc connection error from Google Apps Script

自闭症网瘾萝莉.ら 提交于 2020-11-27 00:28:47
问题 I have created a Google Cloud Project MySQL database to use in conjunction with the Jdbc service provided by Google Apps Script. Everything went as planned with the connection. I am basically connecting as it does in the docs. var conn = Jdbc.getCloudSqlConnection(dbUrl, user, userPwd); I shared the file with another account and all of a sudden I am seeing a red error saying: 'Failed to establish a database connection. Check connection string, username and password.' Nothing changed in the

Jdbc connection error from Google Apps Script

南笙酒味 提交于 2020-11-27 00:28:43
问题 I have created a Google Cloud Project MySQL database to use in conjunction with the Jdbc service provided by Google Apps Script. Everything went as planned with the connection. I am basically connecting as it does in the docs. var conn = Jdbc.getCloudSqlConnection(dbUrl, user, userPwd); I shared the file with another account and all of a sudden I am seeing a red error saying: 'Failed to establish a database connection. Check connection string, username and password.' Nothing changed in the

Jdbc connection error from Google Apps Script

蹲街弑〆低调 提交于 2020-11-27 00:26:24
问题 I have created a Google Cloud Project MySQL database to use in conjunction with the Jdbc service provided by Google Apps Script. Everything went as planned with the connection. I am basically connecting as it does in the docs. var conn = Jdbc.getCloudSqlConnection(dbUrl, user, userPwd); I shared the file with another account and all of a sudden I am seeing a red error saying: 'Failed to establish a database connection. Check connection string, username and password.' Nothing changed in the

How to use a path relative to project root to H2 db-file configuration with Play Framework 2.4?

。_饼干妹妹 提交于 2020-11-25 07:28:05
问题 We're developing a Play 2.4 application (Java API). For dev purposes, we'd like to use a persistent H2 database with DB file path relative to the project root directory. In How to use a persistent H2 database in the Play Framework instead of in-memory there was solution for Play 2.0: db.default.url="jdbc:h2:file:data/db" However, with Play 2.4 this doesn't seem to work but I get error message with the following exception at the bottom: Caused by: org.h2.jdbc.JdbcSQLException: A file path that