467,189 Members | 1,264 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,189 developers. It's quick & easy.

Big problem with DB2 and Clobs...

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

The error I obtain is the following:

SQL Error 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
at aeronautics.MyConsults.access$000(MyConsults.java: 21)
at aeronautics.MyConsults$1.actionPerformed(MyConsult s.java:
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!!!!

Aug 5 '07 #1
  • viewed: 1433

Post your reply

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

Similar topics

1 post views Thread by Richard Galli | last post: by
reply views Thread by FreeStyle | last post: by
3 posts views Thread by Marcus | last post: by
1 post views Thread by tachoknight@gmail.com | last post: by
3 posts views Thread by amitabh.mehra@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.