Bug #18722 moveToInsertRow fails: parameter index out of range (PreparedStatement)
Submitted: 3 Apr 2006 1:31 Modified: 31 Mar 2014 11:39
Reporter: Alan Snyder Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.1.12 OS:MacOS (Mac OS 10.4.5)
Assigned to: Alexander Soklakov CPU Architecture:Any

[3 Apr 2006 1:31] Alan Snyder
Description:
When I attempt to moveToInsertRow() on a result set, I get:

java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).

The insert SQL is:

INSERT INTO "music"."tune types" ("Total Measures","Type Description","Type ID","Parts","Root Type","Type Name","Meter","Measures Per Part") VALUES (?,?,?,?,?,?,?,?)

It looks like the PreparedStatement has parsed the SQL incorrectly. When it finishes the first part of the parsing, inQuotes is true.

My database is set to use UTF8 and ANSI mode.

How to repeat:
Use moveToInsertRow.
[3 Apr 2006 21:16] Mark Matthews
Where is the INSERT sql coming from the driver, or something you've written?
[4 Apr 2006 0:18] Alan Snyder
From the driver.
[15 Jun 2006 19:50] Mark Matthews
Can you test with 3.1.13, this looks like a duplicate of BUG#19724 which was fixed in that release.
[15 Jul 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[31 Mar 2014 11:39] Alexander Soklakov
I close this report as "Can't repeat" because there is no feedback for a long time and codebase is too old. Please, feel free to reopen it if the problem still exists in current driver.