簡體   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