By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,287 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,287 IT Pros & Developers. It's quick & easy.

Big problem with DB2 and Clobs...

P: 1
Hello everyone!

I am spanish and I am developing an application using DB2 v9 and Java. Im currently trying new things but I have a problem.

I can easily do INSERTS from my application into the DB (XML, CLOBS, etc.) but I have problems when I execute:
Expand|Select|Wrap|Line Numbers
  1. String qDesc="SELECT DESCRIPCION FROM AVION";
  2.  
  3.                    Statement pst2 = cx.createStatement();    
  4.                    ResultSet rsd=pst2.executeQuery(qDesc);
  5.                    while (rsd.next())
  6.                    {
  7.                         Clob doc = rsd.getClob(1);
  8.                         InputStream strdoc = doc.getAsciiStream();
  9.                         etc...
  10.  

The error I obtain is the following:


SQL Error com.ibm.db2.jcc.c.SqlException
com.ibm.db2.jcc.c.SqlException
at com.ibm.db2.jcc.c.ec.<init>(ec.java:183)
at com.ibm.db2.jcc.b.d.b(d.java:1328)
at com.ibm.db2.jcc.c.s.a(s.java:748)
at com.ibm.db2.jcc.c.s.U(s.java:1393)
at com.ibm.db2.jcc.c.wf.getClob(wf.java:914)
at aeronautics.MyConsults.btnMostrarActionPerformed(M yConsults
.java:113)
at aeronautics.MyConsults.access$000(MyConsults.java: 21)
at aeronautics.MyConsults$1.actionPerformed(MyConsult s.java:
64)
at java.awt.Button.processActionEvent(Unknown Source)
at java.awt.Button.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Its driving me crazy...Im guessing its a driver problem but Im not sure...

Please, can anyone help me? :)

Oh, by the way, I use netbeans 5.5

Lots of thanks in advance!!!!

Nacho
Aug 5 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.