>> Delete No. 48614 article
No. java 에서 jdbc[mysql] 연결 하는 방법좀 가르쳐 주세요

등록 2002-05-08 15:53:00 By localhost     조회 1
이름 초보    

		[에러 메세지]
 org/gjt/mm/mysql/Driver
java.sql.SQLException: driver not found: jdbc:mysql://localhost/xxx
  
 [코드]
 try
 {
     Class.forName("org.gjt.mm.mysql.Driver");
 }
 catch(ClassNotFoundException e){System.out.println(e.getMessage());}
  String db_url = "jdbc:mysql://localhost/blue";
 Connection Conn = DriverManager.getConnection(db_url,"###","###");
  Statement stmt = Conn.createStatement();
 ResultSet rs = stmt.executeQuery("select title from test  limit 3");
  while (rs.next()) {
   System.out.println(new String(rs.getString(1)));
  }
   
  
 // 머가 문제인지 잘 모르겠어요
 드라이버는...{JavaHome}/jre/lib/ext 에설치 되 있어요
[관리자] 패스워드를 입력 하십시오. 답장이 존재하면 함께 삭제됩니다.[ 목록 | 이전 ]
패스워드:    

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved