× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



How about this:

In a java program:

select onto from file
fetch each as a string
try to create a java.lang.Integer object for each.
Catch the exception and print what you had and the row number you were on.

Then go cleanup the database assuming you wanted all of the values to be
numbers.

Regards,

Richard D. Dettinger
AS/400 Java Data Access Team

"Biologists have a special word for stability -- dead"

                Larry Wall
                Open Source Developers Journal
                Issue 1, Jan  2000


"Eyers, Daniel" <daniel.eyers@honeywell.com>@midrange.com on 09/07/2001
10:28:53 AM

Please respond to java400-l@midrange.com

Sent by:  java400-l-admin@midrange.com


To:   "'java400-l@midrange.com'" <java400-l@midrange.com>
cc:
Subject:  RE: SQL Error - how to track




cool...  I had to change the catch block to catch a SQLException instead of
an Exception but it works like a champ....

here's the sql that's failing....

SELECT OTPRFG, OTONO, OTLINE, OTNO, OTSDTE, OTSQTY, OTHTMS, OTPN FROM
psddata.fhprvddt WHERE Integer(OTNO) = 29925240

I would guess that there is a row where OTNO is not numeric... I would
guess
that it's shown in the joblog somewhere...  Still wondering how to track it
down...

dan


-----Original Message-----
From: Richard Dettinger [mailto:cujo@us.ibm.com]
Sent: Thursday, September 06, 2001 11:02 PM
To: java400-l@midrange.com
Subject: Re: SQL Error - how to track



You can specify "errors=full" on you connection URL.

For example, if you are using the DriverManager to get connections, this
code will provide the second level text in the SQLException message when
errors occur.

     Connection connection = DriverManager.getConnection
("jdbc:db2:system;errors=full");

There is also a DataSource property to accomplish this if you are using
DataSources.

Regards,

Richard D. Dettinger
AS/400 Java Data Access Team

"Biologists have a special word for stability -- dead"

                Larry Wall
                Open Source Developers Journal
                Issue 1, Jan  2000


_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
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 ...


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

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.