【发布时间】:2014-08-09 17:30:49
【问题描述】:
insertSQL = "insert into TELBP_INPUT_LOG (SERIAL_NO, INPUT_XML) values (?, ?)";
statement = connection.prepareStatement(insertSQL);
statement.setString(1, serialNo);
statement.setString(2, inXml);
//statement.setString(2, "test");
insertCount = statement.executeUpdate();
程序运行到executeUpdate()时,报错
java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
抛出,但是如果我复制serialNO和inXml的值在SQL developer中运行,没有错误提示,是什么原因?
oracle版本:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
专栏:
SERIAL_NO VARCHAR2(22)
INPUT_XML CLOB
Websphere:Websphere 5.1
jdbc: ojdbc14 和 ojdbc6 都试过了,都有同样的错误
【问题讨论】:
-
SERIAL_NO 和 INPUT_XML 有哪些列类型?
标签: java oracle sqlexception