This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

COM.ibm.db2.jdbc.DB2Exception in WSAD  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
manasa asapu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!