在JSP中用JDBC-ODBC桥的方式连接Access数据库

2025-04-24 12:15:25
推荐回答(1个)
回答1:

用try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:student");
Statement stmt=conn.createStatement();
String query="create table testtable"+"(id int,name char(10))";
stmt.execute(query);
System.out.println("Create successfully");
}
catch{Exception e}
抛出异常~~看这样得不得~