- 博客(0)
- 资源 (2)
空空如也
jtds-1.2.jar
jtds-1.2.jar
使用Eclipse连接数据库如SQL2000时会需要用到
可通过一下语句进行连接
try{
Class.forName("net.sourceforge.jtds.jdbc.Driver");
System.out.println("数据库驱动加载成功");
}catch(ClassNotFoundException e){
e.printStackTrace();
}
try{
con=DriverManager.getConnection("jdbc:jtds:"+"sqlserver://localhost:1433/数据库名","sa","");
System.out.println("数据库连接成功");
}catch(SQLException e){
e.printStackTrace();
}
2014-04-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人