如何获取缓存行集特定列的原始值?

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

它return是select列的当前值,我只需要return原始值来检查值是否真的改变了。

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");
      }    
  }
}