Oracle大文本clob数据类型的增删改查(四)

2014-11-24 12:55:29 · 作者: · 浏览: 3
etConnection(this.url, this.user, this.pwd);
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
} catch (Exception ex) {
sHint = "Query Exception:" + ex.getMessage();
} www.2cto.com
return rs;
}
/**
* 执行 更新删除等语句
*
* @param sql
* @return 返回执行结果的boolean值
*/
public boolean executeUpdate(String sql) {
try {
Class.forName(this.sDBDriver);
conn = DriverManager.getConnection(this.url, this.user, this.pwd);
stmt = conn.createStatement();
stmt.executeUpdate(sql);
conn.commit();
return true; www.2cto.com
} catch (Exception ex) {
sHint = "Update Exception :" + ex.getMessage();
return false;
}
}
}