|
Hi all: Any idea on how to avoid getting this exception? Here is the code: ...... Class.forName( "com.ibm.as400.access.AS400JDBCDriver"); DriverManager.registerDriver(new com.ibm.as400.access.AS400JDBCDriver()); conn = DriverManager.getConnection( "jdbc:as400://AS400", "userid", "password"); String sqlString1 = "SELECT * FROM SYSSPEC.MYFILE" ; PreparedStatement stmt1 = conn.prepareStatement(sqlString1, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt1.executeQuery(); int recCount = 0; while (rs.next()) { String sqlString2 = "SELECT * FROM " + rs.getString("COMPLIB" ).trim() + "." + "SOMPFM03 WHERE ACCTNMBR = '" + rs.getString("ACTNBR" ).trim() + "'"; PreparedStatement stmt2 = conn.prepareStatement(sqlString2, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs2 = stmt2.executeQuery(); if (!rs2.next()) { recCount++; } } ..... Thanks NOTICE: This message contains information which may be confidential. If the reader is neither the intended recipient nor a person responsible for delivering the message to the intended recipient, you are notified that any distribution, copying or retention of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by return e-mail, telephone or facsimile. Thank you.
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.