|
Adele, You can adjust your connection url to fix this. The following should help: private final String NATIVE_CONNECTION_STRING = "jdbc:db2:*local;naming=system;date format=usa;translate binary=true"; private final String CONNECTION_STRING = "jdbc:as400://pctci.pctci.com;naming=system;date format=usa"; Connection connection = null; .... if (System.getProperty("os.name").equals("OS/400")) { DriverManager.registerDriver((Driver) Thread.currentThread() .getContextClassLoader() .loadClass("com.ibm.db2.jdbc.app.DB2Driver") .newInstance()); connection = DriverManager.getConnection(NATIVE_CONNECTION_STRING); if (Log.isDebugEnabled()) { Log.debug( "Native com.ibm.db2.jdbc.app.DB2Driver registered."); } } else { DriverManager.registerDriver((Driver) Thread.currentThread() .getContextClassLoader() .loadClass("com.ibm.as400.access.AS400JDBCDriver") .newInstance()); connection = DriverManager.getConnection(CONNECTION_STRING); if (Log.isDebugEnabled()) { Log.debug( "Thin com.ibm.as400.access.AS400JDBCDriver registered."); } } David Morris >>> adele_cavalli@xxxxxxxx 7/18/2003 6:58:50 AM >>> I have Tomcat running on as/400. I'm trying to call a SP w/result set from a JSP. If I use the Toolbox everything is fine, but if I use Native I get data in ascii. I'm a very newbie and probably it's a simple problem; is there anybody than can help me ? Thanks. Adele.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.