Thank you so much for your help.
Original Message:
Sent: Wed September 03, 2025 07:23 PM
From: Rex Chan
Subject: updating a column in a table using JDBC adapter
This works for me. I got it from an example map. My knowledge of JDBC adapter is limited.
=VALID(PUT("JDBC", "-URL jdbc:mysql://testserver:3306/testdb?verifyServerCertificate=false&useSSL=false&serverTimezone=UTC -USR testuser -PWD testpassword -DML 'UPDATE testtable SET c2=\'TestValue\' WHERE c1=?'", text(F1 Field:KeyData)), FAIL(LASTERRORMSG()))
------------------------------
Rex Chan
Original Message:
Sent: Tue September 02, 2025 03:18 PM
From: Akhi Singh
Subject: updating a column in a table using JDBC adapter
You can use DML command instead of QUERY with PUT function.
-DML statement_text.
------------------------------
Akhi Singh
Original Message:
Sent: Tue September 02, 2025 09:17 AM
From: Santanu Baral
Subject: updating a column in a table using JDBC adapter
I believe we can't use -QUERY parameter with PUT function...it only works with Inputcard,GET and Outputcard.Adapter is able to execute the update query but ended with exception.Also i could see in the document that -QUERY parameter only can be used to fetch data so i believe we can't update table with using -QUERY parameter with JDBC adapter.
Can someone please confirm whether my understanding is correct?
Thanks
Santanu
------------------------------
Santanu Baral
Original Message:
Sent: Mon September 01, 2025 02:39 PM
From: Akhi Singh
Subject: updating a column in a table using JDBC adapter
Your logic seems somewhat contradictory to me. Maybe it's just my perspective, but I use the GET function to retrieve or read data from tables, and the PUT function for inserting or updating records.
------------------------------
Akhi Singh
Original Message:
Sent: Sat August 30, 2025 10:18 AM
From: Santanu Baral
Subject: updating a column in a table using JDBC adapter
Hi,
I am getting "ORA-01002: fetch out of sequence" error while updating a column in a table using update query in JDBC adapter as below.
The below query update a row in plsql but getting error with jdbc adapter.
This GET function passed in side a function map to update the count column for each id.so for each iteration it supposed to update the column in the table.
is it possible in this way or i need to follow traditional way of creating a type tree of the table with DB adapter with -UPDATE only parameter.
GET("JDBC","-URL <url> -USER <userid> -PASSWORD <pwd> -T -AS 0 -QTY * -LSN 0 -QUERY ""update <tablename> set count='"+Count+"' where id= '" +id+"' and id1='"+id1+"' ")
Error from Trace file
Caused by: Error : 1002, Position : 0, Sql = update <tablename> set count='1' where id= '11' and id1='111', OriginalSql = update <tablename> set count='1' where id= '11' and id1='111', Error Msg = ORA-01002: fetch out of sequence
Thanks
Santanu
------------------------------
Santanu Baral
------------------------------