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



I have a java program that opens a local DB2 connection and also opens a
connection to a remote mySQL server database. That part seems to work.

I then construct a SELECT statement for DB2 as type String. It is a Select
from QSYS2.SYSCOLUMNS to get a list of column names from a DB2 file. The
string is written to my 5250 screen and appears fine. When I copy the
statement into an ACS SQL window, it works as expected. When I copy the
statement into a STRSQL window on a green screen session, it also works as
expected. However, when I attempt to execute the same string within the
java program using executeQuery(string), it fails with:

com.ibm.db2.jdbc.app.DB2JDBCSyntaxErrorException: An undefined column name
was detected.

My questions are:
1. Why do I get this message when the string works?
2. How can I see the statement that is being executed by executeQuery()? I
am thinking something is getting corrupted somehow but not sure how to
find that.

I have a basic knowledge of Java.

Any ideas?

Thank you,

Doug


"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments accompanying it) contain confidential information belonging to the sender. The information is intended only for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of the information is strictly prohibited. Any unauthorized interception of this transmission is illegal under the law. If you have received this transmission in error, please promptly notify the sender by reply e-mail, and then destroy all copies of the transmission."

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.