http://61.131.30.54/123/Develop/Java/SC/

解决方案 »

  1.   

    Access数据库连接: import java.sql.*;public class access{
     public static void main(String[] args) throws Exception{
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
      String url="jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=D:/test.mdb";
      Connection conn = DriverManager.getConnection(url,"密码","密码");
       Statement stmt=conn.createStatement();
       stmt.execute("insert into t_test(name) values('yinlei')");//插入记录   ResultSet res = stmt.executeQuery("select * from t_test");//选择   while(res.next()){
        System.out.println(" "+res.getString("name"));
        }
        res.close();
        stmt.close();
        conn.close();
       }
      }其中有插入和选择语句的例子,D:/test.mdb指数据库的位置,密码可以为空 ""