1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| try {
Class.forName("com.ibm.as400.access.AS400JDBCDriver");
Properties connectionProperties = new Properties();
connectionProperties.put("user", user);
connectionProperties.put("password", pass);
connectionProperties.put("sort", "language");
//connectionProperties.put("sort language", "ENU");
connectionProperties.put("libraries", "SERDEV");
connection = (Connection) DriverManager.getConnection(url, connectionProperties);
connection.setReadOnly(true);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
} |
Partager