我尝试使用以下代码在 Oracle DB 中插入 CLOB。
I found the below code from this link
但是 setStringForClob 不可用,请让我知道我做错了什么。 我使用 oracle 驱动程序 ojdbc14.jar 和 jdk 1.5
String sql = "insert into table values('abc',123,?)";
OraclePreparedStatement st = (OraclePreparedStatement) connection.prepareStatement(sql);
st.setStringForClob(1, /*String variable which contains the CLOB string*/);
最佳答案
尝试获取更新的 JDBC 驱动程序 ojdbc14.jar 确实很旧。使用来自oracle的ojdbc6.jar。
关于java - java中OraclePreparedStatement方法setStringForClob,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14195964/