Commit 2c4d842e authored by 李振振's avatar 李振振

11

parent 63aec77f
......@@ -68,7 +68,7 @@ public class InformixJdbcProxyServiceImpl implements InformixService {
// Unknown exception: Can not find JDBC type `2005` in column type
Driver driver = getDriver();
Connection conn = getConnection(driver);
conn.prepareStatement("SET character_set_results = NULL ").execute();
conn.prepareStatement("select * from \"test_tab_new24\" ").execute();
closeConnection(conn);
deregisterDriver(driver);
}
......@@ -106,7 +106,8 @@ public class InformixJdbcProxyServiceImpl implements InformixService {
private Driver getDriver() throws Exception{
// 定义informix的驱动信息
String driverUrl = "com.mysql.jdbc.Driver";
// String driverUrl = "com.mysql.jdbc.Driver";
String driverUrl = "org.postgresql.Driver";
// 还需要加入informix的jdbc驱动jar包
Class<?> driverClass = Class.forName(driverUrl);
return (Driver) driverClass.getConstructor().newInstance();
......@@ -128,7 +129,7 @@ public class InformixJdbcProxyServiceImpl implements InformixService {
Properties properties = new Properties();
// 组装连接数据库信息 BITBUCKET_NEW
// jdbc:informix-sqli://<server>:<port1526>/<database>:informixserver=<dbservername>
StringBuilder jdbcBuilder = new StringBuilder("jdbc:mysql://localhost:3307/SYSDBA?character_set_results=utf8");// # ?useServerPrepStmts=true
StringBuilder jdbcBuilder = new StringBuilder("jdbc:postgresql://localhost:3307/testdb?character_set_results=utf8");// # ?useServerPrepStmts=true
DriverManager.setLoginTimeout(10);
properties.put("user", "root");
properties.put("password", "Apurelove9014");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment