[讨论]java连接sql server2000的问题 有代码
try{ Class.forName("com.microdoft.jdbc.sqlserver.SQLServerDriver").newInstance();
String url = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=hjhtest";
String user = "hjh";
String password ="hjh";
Connection conn = DriverManager.getConnection(url,user,password);
Statement stmt = conn.createStatement();
String sql = "select * from hjhtest";
ResultSet rs = stmt.executeQuery(sql);
while(rs.next()){
jTextArea1.append(rs.getString("name")+"\n");
}
rs.close();
stmt.close();
conn.close();
}
catch(Exception e){
jTextArea1.append(e.toString()+"\n");
}
出现的错误是:java.lang.ClassNotFoundException: com.microdoft.jdbc.sqlserver.SQLServerDriver
问题出在什么地方?(我已经装了驱动了)