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.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?
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!
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.
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.
@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.