Hi Mike,

A quick google search returned this page which may be of help.

http://www-03.ibm.com/servers/eserver/iseries/toolbox/faqjdbc.html#faqB6

Carl.

On 3/6/07, Mike Burdette <Mike.Burdette@xxxxxxxxxxxxx> wrote:
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.
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.