JAVA如何更新oracle clob字段數(shù)據(jù)
來源:易賢網(wǎng) 閱讀:3751 次 日期:2015-04-27 15:04:18
溫馨提示:易賢網(wǎng)小編為您整理了“JAVA如何更新oracle clob字段數(shù)據(jù)”,方便廣大網(wǎng)友查閱!

JAVA如何更新oracle clob字段數(shù)據(jù)。

//一個可更新的結果集

Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

ResultSet rs = stmt.executeQuery(sql);

rs.next();

//強制轉化成oracle 的clob對象

CLOB responseClob = (CLOB) rs.getClob(clobName);

//oracle clob對象特有的putChars方法追加字符。

responseClob.putChars(responseClob.length()+1,clob.toCharArray());

rs.updateRow();

rs.close();

con.commit();

con.close();

更多信息請查看IT技術專欄

更多信息請查看數(shù)據(jù)庫
易賢網(wǎng)手機網(wǎng)站地址:JAVA如何更新oracle clob字段數(shù)據(jù)
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復僅供參考,敬請考生以權威部門公布的正式信息和咨詢?yōu)闇剩?/div>
關于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權所有:易賢網(wǎng)