File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes SQL error message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL error message" Watch "SQL error message" New topic
Author

SQL error message

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
I am using Visual Age for Java and am trying to connect with JDBC to DB2 AS/400. We have established a connection, but when we try to execute our query, we receive the following error message:
SQL Execution Failed:
[PWS0001]Function did not complete successfully
What the heck does that mean? It's not very explanatory. Could someone please help?
Here is my SQL query:
SELECT
LIZLIB.PCVEND.PCVNO,
LIZLIB.PCVEND.PCVNM,
LIZLIB.PCVEND.PCVCT,
LIZLIB.PCVEND.PCVMIN
FROM
LIZLIB.PCVEND
ORDER BY
LIZLIB.PCVEND.PCVNM
Just a note: this was done by using the SQL Smart Assist Guide. We did not manually wirte this code.
Thanks in advance.
Joel Cochran
Ranch Hand

Joined: Mar 23, 2001
Posts: 301
Hi Jennifer,
I just started using JDBC to DB2/400, so maybe I can help.
Here is my SQL code which works just fine. Notice that the SELECT lists the fields and the FROM specifies the LIBRARY.FILENAME, which is definitely different than your example.

Hope this helps!
------------------
I'm a soldier in the NetScape Wars...
Joel


Wait a minute, I'm trying to think of something clever to say...<p>Joel
 
 
subject: SQL error message
 
Similar Threads
Passing data from text file to table.
JDBC INSERT error
I/O Issues on L3000-5x When Running Java 1.3.1.05 and Oracle 8.1.7
ORA-00933 SQL Command not properly ended
Problem in Select query