This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm trying to create a prepared statement that uses '?' for substitution. The problem that I'm having is that I get an error during execution indicating that there is an invalid "?" in my Update statement. It's right when I try to create the prepared statement:
com.ibm.db2.jcc.b.SqlException: Invalid cursor name "?" in the Update/Delete statement.
Is cursor name substitution not valid in a preparded statement, or maybe in a DB2 prepared statement? I'm guessing that maybe something that I'm overlooking in my update string that is causing the problem, but I just can't figure out what it might be. It doesn't seem to complain about the other '?' in the update string.
I don't think you can pass cursor name as a parameter to a PreparedStatement. Why are you doing it this way as oppossed to
Joined: Mar 12, 2006
Jayesh A Lalwani wrote:I don't think you can pass cursor name as a parameter to a PreparedStatement. Why are you doing it this way as oppossed to
I cut out the actual processing details from what I'm trying to do to eliminate clutter. I don't want to set itim_updated until I've done my processing. I'm iterating through my result set, doing some processing based on the current record, then updating itim_updated (record has been processed). I don't want to update all of the records with recertstatus = 'S' and itim_updated = 'N', as some records might not be processed successfully. Think of it as each row in my result set as a transaction. I hope this is clear.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com