Solved

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

Posted on 2014-03-13
6
736 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 24

Expert Comment

by:Tomas Helgi Johannsson
Comment Utility
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
Comment Utility
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 24

Expert Comment

by:Tomas Helgi Johannsson
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:mruff
Comment Utility
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 24

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now