• 고객센터
  • 교육
  • 매뉴얼
  • 데모
  • 제품소개
조회 수 : 1332
2008.01.30 (22:36:54)

>게시판을 이용해 주셔서 감사합니다.
>다음양식에 맞게 입력해주세요.
>
>* 고객시스템명 : DKUNC
>* GAUCE 버전 : 3.5
>* WAS 종류(WebLogic 등등) :  웹로직 8.1.6
>* DB 종류 : 오라클
>* 문의 유형(질문/요청/참조) : 질문
>* 내용 :
>
>
>일반 사용은 문제 없는데 다음과 같이 다른 DB에 접속하려 하면 문제가 생깁니다.
>Connection conn = null;
>PreparedStatement stmt = null;
>
>try {
>    conn = new DBSource().getConnection("ov_sc");                
>    
>    GauceRequest req = service.getGauceRequest();
>    GauceResponse res = service.getGauceResponse();
>    GauceDataSet dSet = new GauceDataSet();
>    res.enableFirstRow(dSet);
>    stmt = conn.prepareStatement(query);
>    StandardGauceStatement gstmt= new StandardGauceStatement(stmt, "KSC5601", "KSC5601", "KSC5601");
>    gstmt.executeQuery(dSet);
>    dSet.flush();
>    res.commit("Terminated successfully!");
>    res.close();
>    stmt.close();
>    gstmt.close();
>} catch (Exception e) {
>    logger.err.println(this, e);
>    throw e;
>} finally {
>    try {
>        conn.close();
>    }catch(Exception ex){}
>    loader.restoreService(service);
>}
>
>이런식으로 Data를 가져오는데 한글이 깨집니다.
>
>StandardGauceStatement에서 캐릭터 세팅을 하는것 같은데요.
>
>캐릭터 셋 3가지를 설정하는데 이부분에 대한 해결방안이라던가 아니면 StandardGauceStatement의 파라미터 사용내역에 대한 설명을 받고 싶습니다.


이하는 API 입니다.
====================================================================================
public class StandardGauceStatement
extends java.lang.Object
implements GauceStatement
GauceStatement인터페이스를 구현한 클래스이며, PreparedStatement의 기능을 확장하여 Gauce에서 활용할 수 있도록 한 클래스이다.

StandardGauceStatement(java.sql.PreparedStatement pstmt, java.lang.String charsetIn, java.lang.String charsetOut, java.lang.String charsetDefault)
          생성자, PreparedStatement와 사용할 character set으로 객체를 생성한다.

====================================================================================

StandardGauceStatement은 conn = service.getDBConnection(); 처럼 Gauce의 service 에서

연결을 가져올때 사용하는 것입니다.

따라서 위의 구분은 PrepareStatement 로 대체되야 정상작동 할 것입니다.

업무에 참고하세요.
 
Tag List
XE Login