database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
ㆍCUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
CUBRID Q&A 998 게시물 읽기
No. 998
Q.에러좀 찾아주세요 ㅠ
작성자
에구
작성일
2008-03-13 14:18:07
조회수
4,074

try{

        sql = \"selete trade_num,bidder_count from a\";

        ps = conn.prepareStatement(sql);

        rs = ps.executeQuery();

        while(rs.next()){

                PreparedStatement ps2 = null;

                trade_num                 = rs.getInt(\"trade_num\");

                bidder_count                 = rs.getInt(\"bidder_count\");

                if(bidder_count != 0){

                        PreparedStatement ps3 = null;

                        ResultSet rs3 = null;

                        sql =         \" select bid_num, bid_price, bidder_nid, bidder_char, top_bid_flag \" +

                                        \" from b where trade_num = ?\";

                        ps3 = conn.prepareStatement(sql);

                        ps3.setInt(1,trade_num);

                        rs3 = ps3.executeQuery();

                        while(rs3.next()){

                                에러

                        }

                        if(ps3 != null){ps3.close();}

                        if(rs3 != null){rs3.close();}

                }

                

        }//while(rs.next()){

 

        if(ps != null){ps.close();}

        if(rs != null){rs.close();}

}catch(Exception ex){

        ex.printStackTrace();

        try{

                conn.rollback();

        }catch(Exception ex1){

                ex1.printStackTrace();

        }

}finally{

}

 

에러내용

cubrid.jdbc.driver.CUBRIDException: Attempt to access a closed ResultSet.

        at unisql.jdbc.driver.UniSQLResultSet.checkIsOpen(UniSQLResultSet.java:1639)

        at unisql.jdbc.driver.UniSQLResultSet.next(UniSQLResultSet.java:178)

        at com.mgame.auction.WffmAuction.auction_data(WffmAuction.java:56)<-5번줄 while(rs.next()){ 이부분

        at com.mgame.auction.WffmAuction.main(WffmAuction.java:156)

 

 

 

아무리봐도 못찾겠네요. ㅠㅠ

이 글에 대한 댓글이 총 2건 있습니다.

확인 하여 알려드리겠습니다.

 

>try{

>        sql = \"selete trade_num,bidder_count from a\";

>        ps = conn.prepareStatement(sql);

>        rs = ps.executeQuery();

>        while(rs.next()){

>                trade_num                 = rs.getInt(\"trade_num\");

>                bidder_count                 = rs.getInt(\"bidder_count\");

>                if(bidder_count != 0){

>                        PreparedStatement ps3 = null;

>                        ResultSet rs3 = null;

>                        sql =         \" select bid_num, bid_price, bidder_nid, bidder_char, top_bid_flag \" +

>                                        \" from b where trade_num = ?\";

>                        ps3 = conn.prepareStatement(sql);

>                        ps3.setInt(1,trade_num);

>                        rs3 = ps3.executeQuery();

>                        while(rs3.next()){

>                                에러

>                        }

>                        if(ps3 != null){ps3.close();}

>                        if(rs3 != null){rs3.close();}

>                }

>                

>        }//while(rs.next()){

>

>        if(ps != null){ps.close();}

>        if(rs != null){rs.close();}

>}catch(Exception ex){

>        ex.printStackTrace();

>        try{

>                conn.rollback();

>        }catch(Exception ex1){

>                ex1.printStackTrace();

>        }

>}finally{

>}

>

>에러내용

>cubrid.jdbc.driver.CUBRIDException: Attempt to access a closed ResultSet.

>        at unisql.jdbc.driver.UniSQLResultSet.checkIsOpen(UniSQLResultSet.java:1639)

>        at unisql.jdbc.driver.UniSQLResultSet.next(UniSQLResultSet.java:178)

>        at com.mgame.auction.WffmAuction.auction_data(WffmAuction.java:56)<-5번줄 while(rs.next()){ 이부분

>        at com.mgame.auction.WffmAuction.main(WffmAuction.java:156)

>

>

>

>아무리봐도 못찾겠네요. ㅠㅠ

 

김범준님이 2008-03-13 16:28:11에 작성한 댓글입니다. Edit

관련하여 FAQ에 해결 방법이 있습니다.

\"Attempt to access a closed ResultSet.\"이라는 오류발생

 

>try{

>        sql = \"selete trade_num,bidder_count from a\";

>        ps = conn.prepareStatement(sql);

>        rs = ps.executeQuery();

>        while(rs.next()){

>                trade_num                 = rs.getInt(\"trade_num\");

>                bidder_count                 = rs.getInt(\"bidder_count\");

>                if(bidder_count != 0){

>                        PreparedStatement ps3 = null;

>                        ResultSet rs3 = null;

>                        sql =         \" select bid_num, bid_price, bidder_nid, bidder_char, top_bid_flag \" +

>                                        \" from b where trade_num = ?\";

>                        ps3 = conn.prepareStatement(sql);

>                        ps3.setInt(1,trade_num);

>                        rs3 = ps3.executeQuery();

>                        while(rs3.next()){

>                                에러

>                        }

>                        if(ps3 != null){ps3.close();}

>                        if(rs3 != null){rs3.close();}

>                }

>                

>        }//while(rs.next()){

>

>        if(ps != null){ps.close();}

>        if(rs != null){rs.close();}

>}catch(Exception ex){

>        ex.printStackTrace();

>        try{

>                conn.rollback();

>        }catch(Exception ex1){

>                ex1.printStackTrace();

>        }

>}finally{

>}

>

>에러내용

>cubrid.jdbc.driver.CUBRIDException: Attempt to access a closed ResultSet.

>        at unisql.jdbc.driver.UniSQLResultSet.checkIsOpen(UniSQLResultSet.java:1639)

>        at unisql.jdbc.driver.UniSQLResultSet.next(UniSQLResultSet.java:178)

>        at com.mgame.auction.WffmAuction.auction_data(WffmAuction.java:56)<-5번줄 while(rs.next()){ 이부분

>        at com.mgame.auction.WffmAuction.main(WffmAuction.java:156)

>

>

>

>아무리봐도 못찾겠네요. ㅠㅠ

 

손승일님이 2008-03-13 17:18:12에 작성한 댓글입니다. Edit
[Top]
No.
제목
작성자
작성일
조회
1001Q.아래 질문글 다시 질문드립니다. [1]
현재
2008-03-14
6275
1000Q.PHP Setup for IIS 환경하에서 큐브리드 세팅문제 [2]
현재
2008-03-14
5895
999Q.클래스 편집에서... [1]
사용자
2008-03-13
4176
998Q.에러좀 찾아주세요 ㅠ [2]
에구
2008-03-13
4074
997Q.java VM cannot be started JNI_CreateJavaVM. 처리?? [1]
정총균
2008-03-13
3590
996Q.로드디비시 오류에 관한 재질문 [1]
안성민
2008-03-13
3522
995Q.이런 에러가 [1]
이상인
2008-03-13
3518
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2019 DSN, All rights reserved.
작업시간: 0.081초, 이곳 서비스는
	PostgreSQL v11.3으로 자료를 관리합니다