Background Image

FORUM

?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

Attempt to call a method related to scrollability of non-scrollable ResultSet. 오류 문의

 

안녕하세요 테스트 중에 안되는 생겨서 문의 드립니다.

 

Connection conn = null;
PreparedStatement pstmt = null;
PreparedStatement pstmt2 = null;
ResultSet rs = null;
ResultSet rs2 = null;


.

.

.

 

try{

 pstmt = conn.prepareStatement(sql);
 rs = pstmt.executeQuery();
 rs.last();
 cnt = rs.getRow();
 rs.beforeFirst();
 conn.commit();
 }catch(SQLException e){
 System.out.println(e.getMessage());
}

rs.last() 으로 커서를 마지막으로 옮기고 rs.getRow() 으로 row수를 가져 오려고 하는데

rs.last() 이부분에 exception 이 발생합니다.

따로 설졍해줘야 할 부분이 있나요?

  • ?
    손승일 2011.07.28 02:59

    rs.last()를 사용하기 위해서는

    ps = conn.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

    와 같이 statement를 생성할 때 옵션을 줘야 합니다.


  1. No Image notice by admin 2024/04/23 by admin
    Views 43 

    CUBRID 사용자를 위한 DBeaver 도구 출시 안내

  2. SQLGate for CUBRID 영구 무료 라이선스 제공

  3. UPDATE/INSERT를 한번에 하는 쿼리 질문드립니다.

  4. No Image 02Aug
    by 큐피
    2018/08/02 by 큐피
    Views 663 

    UPDATE 문 WHERE절에 IN

  5. UPDATE 다중 테이블 질문드립니다.

  6. Trigger 이벤트 시점에 대해 질문드립니다.

  7. Transaction 확인시 sql_id, sql text가 나오질 않습니다.

  8. TimeZone 관련 질문

  9. TimeStamp 관련 Select 오류 질문입니다

  10. No Image 30Mar
    by 님장사드리브큐
    2017/03/30 by 님장사드리브큐
    Views 8246  Replies 2

    Tibero -> Cubrid 마이그레이션 질문입니다.

  11. This object is in a zombie state 인 경우

  12. This object is in a zombie state 오류발생 도와주세요 ㅠㅠ

  13. This may take a long time depending on the amount of recovery works to do.?

  14. The size of data received from server is different from the expected

  15. The column name is invalid. 에러메시지 좀...

  16. Table 및 column에 대한 description은 제공을 안하나요?

  17. Table 및 Index 가 사용하고 크기를 알수 있는 방법을 알려 주세요

  18. Table 및 Column Comment 작성

  19. Table primary key잡는 중 중단 시키고, 서버 재시작하니 에러나고 시작이 안되네요.

  20. Table doesn't exist 에러..

  21. Table Drop, truncate 시 시간이 너무 오래 걸립니다.

  22. Table Drop 후 데이터 볼륨 Size 에 변동이 없네요.

Board Pagination Prev 1 ... 143 144 145 146 147 148 149 150 151 152 ... 200 Next
/ 200

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales