All Forums Connectivity
jan.simecka 4 posts Joined 01/13
26 Feb 2013
JDBC updateRow error - No value has been set for parameter 3

Hello,
my app connects to Teradata DB via JDBC driver. When I try to update a row of a ResultSet (the ResultSet is CONCUR_UPDATABLE), I get the following error:
com.teradata.jdbc.jdbc 4.util.JDBCException: [Teradata JDBC Driver] [TeraJDBC 14.00.00.21] [Error 858] [SQLState 07004] No value has been set for parameter 3
 
The table I'm trying to update is created like this:
CREATE TABLE XXX.Test (
test_ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 100 INCREMENT BY 1),
test_Name VARCHAR (100) UNIQUE NOT NULL,
CONSTRAINT pk PRIMARY KEY (test_ID)
);
 
The code that's updating the row looks like this:
ResultSet rs; Int row; String value;
rs.absolute(row);
rs.updateString(col, value);
rs.updateRow(); --- here is where the error occures
 
When I change the table so that table_Name is not UNIQUE, the updating works properly. Any ideas what I'm doing wrong? What is this parameter 3 it is asking about?

Thanks,
Jan
 
 
 

tomnolan 594 posts Joined 01/08
27 Feb 2013

JDBC DR 163807 - Updatable ResultSet exception "No value has been set for parameter" with unique column
has been created to cover this problem.
Thanks for reporting it to us!

tomnolan 594 posts Joined 01/08
29 Mar 2013

The fix for JDBC DR 163807 is now available in Teradata JDBC Driver versions 13.00.00.32, 13.10.00.35, 14.00.00.36, and 14.10.00.16.

farhanhafeez 1 post Joined 09/13
09 Sep 2013

I am getting "No value has been set for parameter 1" error when I am using parameter markers on a table with IDENTITY column. Query works completely fine when run directly from SQL Assistant. 
Also, when I do not use parameter markers, query works fine. I am using 14.10.00.17 with Teradata 13.10. 

tomnolan 594 posts Joined 01/08
10 Sep 2013

@farhanhafeez, please do not reuse old forum threads. Please start a new thread for a new question.
 
And when you post your question to a new thread, please provide some details, such as the CREATE TABLE statement and your Java code that sets the parameter values.

You must sign in to leave a comment.