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. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views31
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4457
    read more
  3. A serial object already exists as an auto increment constraint. 오류 질문

    Date2013.10.28 Bykimsuny Views15984
    Read More
  4. ACTION 명령어? 예약어?

    Date2024.04.17 By투투투투기기 Views20
    Read More
  5. ACTIVE_SESSION 이 48수치에 DB 다운되어 버립니다.

    Date2010.07.25 By안토니오 Views10904
    Read More
  6. ACXEL_Installer를 이용할려는데

    Date2010.12.20 BySoMa Views7716
    Read More
  7. ADD AFTER, FIRST 명령어와 ALTER MODIFY, CHANGE 문제

    Date2017.03.01 By무냉채 Views9435
    Read More
  8. ADD_MONTHS 함수의 사용

    Date2009.06.25 By체리필터 Views16172
    Read More
  9. ADO update관련 문의드립니다.

    Date2014.01.26 BySD2 Views7686
    Read More
  10. ADO.NET "Invalid buffer position!" 오류

    Date2014.07.17 By할리 Views7520
    Read More
  11. ADO.NET 4.5 SQL query의 칼럼이름가져오기

    Date2017.09.06 Byallis Views394
    Read More
  12. ADO.NET Connector 문의

    Date2021.08.31 By까망이 Views68
    Read More
  13. ADO.NET cascci.dll 64Bit 관련

    Date2015.11.06 By할리 Views6141
    Read More
  14. ADO.NET cascci.dll 64Bit, field name/type 오류

    Date2016.01.21 By할리 Views6629
    Read More
  15. ADO.NET columninfos 반환값 관련 문의

    Date2020.05.26 ByJs Views115
    Read More
  16. ADO.NET columninfos 반환값 관련 문의

    Date2020.05.18 ByJs Views171
    Read More
  17. ADO.NET dll 참조

    Date2018.10.04 Byabc12 Views894
    Read More
  18. ADO.NET 관련 질문

    Date2015.10.30 By할리 Views6442
    Read More
  19. ADO.NET 드라이버 집합형 데이터 지원

    Date2012.02.09 By소라게 Views39855
    Read More
  20. ADO.NET 에러

    Date2021.09.14 By둠둠둠 Views66
    Read More
  21. ADO.NET 에서 connection pool 사용 가능한가요?

    Date2022.11.04 By시나브로 Views33
    Read More
  22. ADO.NET 을 비쥬얼 스튜디오에 연결하기...

    Date2012.02.12 By희나람 Views11728
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 200 Next
/ 200

Contact Cubrid

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