× 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.



Wow, that's kinda weird.  The driver should not care at all about the
difference between select * and select <column>.  That's really a parser
detail.

I assume from this description that you can do this in a simple stand alone
program.  If so, run the code from the CL command line the following two
ways.

Assuming there are two programs called "SelectStar" and "SelectSpecific",
run these:

java SelectStar
prop((jdbc.db2.cli.trace true)
     (jdbc.db2.trace.config 'file:///SelectStar.txt'))

java SelectSpecific
prop((jdbc.db2.cli.trace true)
     (jdbc.db2.trace.config 'file:///SelectSpecific.txt'))

This will create the two specified text files in the IFS root directory.

E-mail these directly to me and any other important info I may need about
the the situation.  I'll take a look and see if I can figure something out.
If it's a general issue/bug/etc.  I'll post to the group with the solution.
Otherwise I'll just work with you directly on it.

Richard D. Dettinger
AS/400 Java Data Access Team

Democracy's enemies have always underestimated the courage of the American
people.
It was true at Concord Bridge.  It was true at Pearl Harbor.  And it was
true today.

         Rochester Post-Bulletin
         Tuesday September 11, 2001


"Raikov, Lo" <Lo.Raikov@MISYS.COM>@midrange.com on 12/06/2001 12:40:10 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:  JDBC native driver/code page conversion



I'm using the native AS/400 JDBC driver. The following code works fine:

------------------------------------------------
query = "SELECT * FROM GDPF WHERE GDUSID=?";
pstmt = con.prepareStatement(query);
pstmt.setString(1, equser);
rs = pstmt.executeQuery();

while (rs.next()) {

String option = rs.getString("GDOID");
.
.
.
------------------------------------------------

but when I replace "SELECT *" with "SELECT GDOID" (that's the only field of
the result set I'm actually interested in) rs.getString("GDOID") returns a
garbled value (it looks like it's not properly converted from EBCDIC,
although I may be wrong). CCSID of the file is set to 37 but no specific
CCSID was defined for GDOID field. CCSIDs of the system and the jobs
involved are all set to 37.

What's wrong? Or could it be that the driver is working as designed?

Lo
_______________________________________________
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.