请教高手
我是一个初学者,我有一个程序是这样的
public class loadIBtestdb{
public static void main(String args[]){
String url="jdbc:odbc://localhost/f:/student.sql";
String user="NING";
String password="19810604";
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("chenggong");
}
catch(java.lang.ClassNotFoundException e){
System.out.println("failed");
System.out.println(e.getMessage());
return;
}
try{
java.sql.Connection con=java.sql.DriverManager.getConnection(url,user,password);
System.out.println("succcess");
con.close();
}
catch(java.sql.SQLException e){
System.out.println("failed");
System.out.println("sqlExption:"+e.getMessage());
return;
}
}
}
不能运行,提示是
chenggong
failed
sqlExption:[Microsoft][ODBC 驅動程式管理員] 找不到資料來源名稱且未指定預設的驅動
程式
Press any key to continue...
数据库是用记事本写的