close
  • 홈
  • :
  • 위치로그
  • :
  • 태그
  • :
  • 방명록
  • :
  • 관리자
  • :
  • 새글쓰기
블로그 이미지

이슬나라 [isulnara.com]
프로그램 관련 문의...
전체 (208)
자작 프로그램 (24)
EzIP (3)
IEPageSetup (3)
iSysInfoX (2)
메신저 알림이 (1)
ezSVC (1)
WebFTP (2)
iDebugX (1)
기타 (10)
버그 신고 (1)
이것저것.. (55)
WebFTP 게시판 (0)
팁 모음 (77)
linux (21)
프로그래밍 (36)
윈도우 (5)
네크워크 (7)
기타 (7)
윈도우 숨은.. (4)
터미널 서비스.. (1)
공개 웹하드 (1)
관리자 (0)
PC 원격제어.. (1)
NAS (43)
«   2012/02   »
일 월 화 수 목 금 토
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      
메신저 Andorid 인증 ProxyPass 시리얼통신 아이피 setuid pascal 나스 zbs-200 강의 MACAddress Points 태터툴즈 dspack msn 알림이 usb station2 mantis Peak Detection 펌웨어 330 네임서버 xbmc cwRSync flex Thread CPUID msnAlert SimpleSMS rsync
[ezLink] 동시 접속수...
ezLink 1.2.1.2 정식... (3)
MD5 CRC 체크섬.
Apache, Subversion...
CentOS에 MongoDB 설치.
예.. 제가 직접 만들어서...
isul / 01/29
직접 만드시는 프로그램...
LuckySh / 01/28
109j용 1869가 synology...
isul / 01/22
Ds-109j 1869 가지고 계...
심재규 / 01/21
시도해보지는 않았지만 S...
isul / 01/20
일반 어플리케이션을 서...
ㅇㅇ/ / 2009
사이코웨어 : nProtect,...
√ MIRiyA's AstraLog / 2008
웹페이지에서 인쇄시 머...
醉生夢死™ / 2006
웹페이지에서 MAC Addres...
날자~!! 날어~!! / 2005
 최근글 목록
 2011/11 [2]
 2011/10 [3]
 2011/09 [1]
 2011/07 [3]
 2011/06 [1]
넷하드 - NAS 카페
무료 원격제어 프로그램
블로그가 뭥미?
솔라리스 테크넷
스티브 맥코넬
시놀로지 NAS 카페
하얀나무 - 캠핑 전문 쇼핑몰
하얀나무's Story
Total of
456393 visitors
Today 100
Yesterday 189
 
글검색결과[SQLSERVER] : 1
2008/02/14  [JDBC for SQLSERVER] Cannot Start a Cloned Connection While in Manual Transaction Mode
     
 팁 모음/프로그래밍 
[JDBC for SQLSERVER] Cannot Start a Cloned Connection While in Manual Transaction Mode
Posted on 2008/02/14 12:37
 
 
 
 
SYMPTOMS
While using the Microsoft SQL Server 2000 Driver for JDBC, you may experience the following exception:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.

CAUSE
This error occurs when you try to execute multiple statements against a SQL Server database with the JDBC driver while in manual transaction mode (AutoCommit=false) and while using the direct (SelectMethod=direct) mode. Direct mode is the default mode for the driver.

RESOLUTION
When you use manual transaction mode, you must set the SelectMethod property of the driver to Cursor, or make sure that you use only one active statement on each connection as specified in the "More Information" section of this article.

STATUS
This behavior is by design.

MORE INFORMATION
Steps to Reproduce the Behavior
Use the following code to reproduce the error:

NOTE: See the comments in the code for information on the code changes that are required to resolve the problem.

import java.sql.*;
import java.io.*;


public class Repro{

    public static void main(String args[])
    {
        try {
            Connection con;
            Statement s1 = null;
            ResultSet r1 = null;
            Statement s2 = null;
            ResultSet r2 = null;
            Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
            con = DriverManager.getConnection(
                "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs;SelectMethod=Direct;User=User;Password=Password");
            //fix 1
                //"jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=pubs;SelectMethod=Cursor;User=User;Password=Password");
            con.setAutoCommit(false);
            
            try {
                s1 = con.createStatement();
                r1 = s1.executeQuery("SELECT * FROM authors");
                
                //fix 2
                //r1.close();
                //s1.close();

                s2 = con.createStatement();
                r2 = s2.executeQuery("SELECT * FROM publishers");
            }
            catch (SQLException ex)
            {
                System.out.println(ex);                
            }
        
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}


출처: http://support.microsoft.com/kb/313181
Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
이올린에 북마크하기(0) 이올린에 추천하기(0)
JDBC, SQLSERVER
Trackback [0] : Comment [0]
TrackbackAddress
http://isulnara.com/tt/trackback/154
SecretComment
  1