JDBC Error in insert with DB2 (works with Sql Server) -
i use in java application jdbc query dbms. application works correctly sql server error in db2 during 1 insert:
com.ibm.db2.jcc.am.sqldataexception: db2 sql error: sqlcode=-302, sqlstate=22001, sqlerrmc=1, driver=3.63.75
the insert made using resultset.type_scroll_sensitive, resultset.concur_updatable
.
my query plain select of table, declare preparedstatement
, passing parameters , afterwards resultset
first movetoinsertrow()
, insertrow()
.
do know if there problems approach using db2?
as told before same code works correctly sql server.
sql code -302 on db2 means:
the value of input variable or parameter number position-number invalid or large target column or target value
so seems trying insert value column large or short (e.g. hello world
varchar(5)
). column has different length in db2 , sql-server or inserting different values.
Comments
Post a Comment