1. mssql 2005에 local이 아닌 remote로 접속하기 위해서는 mssql 2005 jdbc driver v1.2가 필요합니다.
해당페이지 가기.
직접 다운로드
2. 위페이지에서 다운 받은 파일의 압축을 풀고 라이브러리를 톰켓에 삽입합니다.
3. 연결을 생성합니다.
해당페이지 가기.
직접 다운로드
2. 위페이지에서 다운 받은 파일의 압축을 풀고 라이브러리를 톰켓에 삽입합니다.
3. 연결을 생성합니다.
try{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
}catch (Exception E){
out.println("Unable to load Driver");
E.printStackTrace();
}
Connection conn;
try{
String Surl = "jdbc:sqlserver://ants.mju.ac.kr:1433";
String Sid = "아이디";
String Spass = "패스워드";
conn = DriverManager.getConnection(Surl,Sid,Spass);
Statement stmt = conn.createStatement();
}catch(Exception e){
out.println("에러 "+ e);
e.printStackTrace();
}finally{
오픈한 자원들을 모드 닫는다.
}
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
}catch (Exception E){
out.println("Unable to load Driver");
E.printStackTrace();
}
Connection conn;
try{
String Surl = "jdbc:sqlserver://ants.mju.ac.kr:1433";
String Sid = "아이디";
String Spass = "패스워드";
conn = DriverManager.getConnection(Surl,Sid,Spass);
Statement stmt = conn.createStatement();
}catch(Exception e){
out.println("에러 "+ e);
e.printStackTrace();
}finally{
오픈한 자원들을 모드 닫는다.
}
sqljdbc_1.2.2828.100_kor.exe