Solved

DB2 SQL0727N when inserting BLOB after updating DB2 client from V7 to V8.5

Posted on 2014-03-13
6
765 Views
Last Modified: 2014-04-14
Dear experts,
the following code fragment* worked with DB2 client V7, after upgrading to V8
the following exception is returned
SQL0727N An error occurred during implicit system action type "2". Information returned for the error includes SQLCODE"-10", SQLSTATE"42603" and message tokens "AND RequestID=4352392". SQLSTATE=56098

*
File file = new File(inputFileName);
FileInputStream fis= new FileInputStream(file);
BufferedInputStream bis = new BufferdInputStream(fis);
ps = db2_connection.PepareStatement("Update field1 set PdfBlob=? WHERE Id_Job="+jobID);
ps.setBinaryStream(1, bis,(int)file.length());
ps.executeUpdate();
0
Comment
Question by:mruff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 39925979
Hi!

The sqlcode you are getting is SQLCODE"-10" which means that
"The string constant begining with stringA is not terminated."
In your case the stringA is  "AND ...

You need to check your code and the sqlstatement involved and repair/add a string termination in the correct place.

The error doesn't seem to do with the update statement you provided. ;)

Regards,
     Tomas Helgi
0
 

Author Comment

by:mruff
ID: 39925989
Hi Thomas,
Thank you, the issue must be related to the DB2 client upgrade
The code runs UNCHANGED with a db2 V7 client and NOT with a V8 db2 client set up
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 39926019
Hi!

Have you located/found the statement that is causing the error ?
There seems to be some parsing issues with that statement.

Regards,
   Tomas Helgi
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mruff
ID: 39932728
Hi Thomas,
Unfortunately I do not have the source code.
But as mentioned earlier:
This error arises after upgrading the db2 client from V7 to V8
The code causing the problem DID NOT change so the root cause MUST be related to the db2 client upgrade.
The current code uses a Type 2 DB2 JDBC driver, probably it's worth trying the the Type 4 driver
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 39939339
Hi!

Have you located/found the statement that is causing the error ?
This error is not related to this statement below as the "AND..." does not appear in it.

ps = db2_connection.PepareStatement("Update field1 set PdfBlob=? WHERE Id_Job="+jobID);

The error clearly indicates parsing error in one of your statements. There has been some improvements in parsing between versions of DB2 after v7 but some actions
needed from the programmer if I remembered it correctly.

Regards,
    Tomas Helgi
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39939346
And the quoted statement should of course be

ps = db2_connection.prepareStatement("Update field1 set PdfBlob=? WHERE Id_Job=?");

Open in new window

0

Featured Post

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question