Solved

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

Posted on 2014-03-13
6
746 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
  • 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Checkbox and ListView in Android Layout 4 65
even odd program using while loop 3 40
type mismatch (Object[] to double[] 4 24
How do I remove an object from a 3 23
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

786 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