permaculture playing cards*
The moose likes Websphere and the fly likes COM.ibm.db2.jdbc.DB2Exception in WSAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "COM.ibm.db2.jdbc.DB2Exception in WSAD" Watch "COM.ibm.db2.jdbc.DB2Exception in WSAD" New topic
Author

COM.ibm.db2.jdbc.DB2Exception in WSAD

manasa asapu
Greenhorn

Joined: Sep 30, 2002
Posts: 10
Hi,
I am getting the following error while trying to connect to a DB2 database from WSAD.
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0637E QUERY cannot be found.
My desktop is installed with WSAD411 and the DB2 version is 7 with Fix Pack 6.0.
Here's the snippet of the code that is part of the servlet:
ResultSet rs1 = stmt1.executeQuery("SET SCHEMA srvr1215");
String query = "select * from M_USER_PROFILE where USERID='"+name+"' and PASSWORD ='"+passwd+"'";
ResultSet rs2 = stmt2.executeQuery(query);
while(rs.next()){checkUser = rs.getString(1);checkPass = rs.getString(2);}
Please let me know if you have encounterend this error and what you did as a solution. Thanks in advance!
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
I think this is because you can't use executeQuery() with a "SET" statement. Use executeUpdate() instead.
See http://dbforums.com/archive/39/2002/06/3/267362
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
manasa asapu
Greenhorn

Joined: Sep 30, 2002
Posts: 10
Hi Kyle,
Thanks much for the update!
I did find another solution to the problem at hand and it worked. Here's a link to the article -
http://www-3.ibm.com/software/data/db2/udb/ad/db2irfp7/db2ir326.htm
Manasa
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: COM.ibm.db2.jdbc.DB2Exception in WSAD
 
Similar Threads
java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver
WAS 4.0.5 DB2 7.2 (NT) connection
StaleConnectionException
java DB2 program
db2 express-c 9.7 failure in loading t2 native library db2jcct2