繁体   English   中英

如何获取cachedrowset的特定列的原始值?

[英]How can i get the original values of specific column of cachedrowset?

它返回选择列的当前值,我所需要的就是返回原始值,以检查该值是否真的改变了。

while(rs.next()){
    if (rs.rowUpdated){
        String strOrigVal = "";
        rs.getOriginalRow();
        strOrigVal = rs.getString("col1");
    }
}
 ResultSet getOriginalRow() throws SQLException 
while(rs.next()){
  if (rs.rowUpdated){
      String strOrigVal = "";
      ResultSet ors = rs.getOriginalRow(); //you should catch the return value
      if(ors.next()){ //move to the first cursor
        strOrigVal = ors.getString("col1");
      }    
  }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM