jconnect

How to connect to Sybase ASE using JDBC driver and SSL connection

余生长醉 提交于 2019-12-24 13:43:13
问题 I'm trying to establish an SSL connection to a Sybase ASE 15.7 using JDBC driver with no luck. I tried the following options: Using JTDS 1.25 driver (jtds-1.2.5.jar) With the following connection string: jdbc:jtds:sybase://host:port;databaseName=dbname;ssl=request I got Network error IOException: Connection refused Using Jconnect 4 (jconn4.jar) with the following connection string: jdbc:sybase:Tds:host:port/dbname?ENABLE_SSL=true I got java.sql.SQLException: JZ00L: Login failed. Examine the

jConnect4 pooled connection does not work as documented

人走茶凉 提交于 2019-12-11 18:09:18
问题 Official Sybase jConnect Programmers Reference suggests following way to use pooled connections: SybConnectionPoolDataSource connectionPoolDataSource = new SybConnectionPoolDataSource(); ... Connection ds = connectionPoolDataSource.getConnection(); ... ds.close(); However getDataSource always causes exception. I decompiled SybConnectionPoolDataSource and found that the method call explicitly generates an error: public Connection getConnection() throws SQLException { ErrorMessage.raiseError(

Sybase IN and OUT parameters

↘锁芯ラ 提交于 2019-12-10 14:59:35
问题 I'm going nuts about how the Sybase JDBC driver handles stored procedures with mixed IN and OUT parameters. Check out this simple stored procedure: CREATE OR REPLACE PROCEDURE p (IN i1 INT, OUT o1 INT, IN i2 INT, OUT o2 INT) BEGIN set o1 = i1; set o2 = i2; END And here's how I'd call it with JDBC: CallableStatement c = connection.prepareCall("{ call dba.p(?, ?, ?, ?) }"); c.setInt(1, 1); c.setInt(3, 2); c.registerOutParameter(2, Types.INTEGER); c.registerOutParameter(4, Types.INTEGER); c