建立odbc数据源:
在“控制面板”-〉“管理工具”-〉数据源(ODBC)-〉用户DSN中添加驱动程序为access或SQLsever2000的数据源。
注意,在添加过程中,要选择“更改默认的数据库”为你需要的数据库。

解决方案 »

  1.   

    //----------- JDBC.ODBC----------- 
        try{
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          Connection con = DriverManager.getConnection("jdbc:odbc:MyClass");
          Statement stmt = con.createStatement();
          ResultSet result = stmt.executeQuery("select * from Class");
          
          while(result.next()){
            String name = result.getString("姓名"); //列名为 姓名 的列
            Date  Birthday= result.getDate(1); //第二列
          }
          con.close();
        }catch(Exception e){
          System.out.println(e.toString());
        }//----------- Oracle----------- 
        try{
          Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
          String url="jdbc:oracle:thin:@localhost:1521:Table";
          String user="system";
          String password="manager";
          Connection con= DriverManager.getConnection(url,user,password);
          Statement stmt = con.createStatement();
          stmt.executeUpdate("sql");
          con.close();
        }catch(Exception e){
          System.out.println(e.toString());
        }通过 SQL 语句就可以添加或查询数据
      

  2.   

    界面嘛 用 JBuilder 画吧
    很 Easy 的
      

  3.   

    建议你加一个 JTable 用以显示查询的结果
    查询 和 输入数据 表单可以做成像网站注册时的表单一样因为各人的数据库内容不一样 所以只能你自己完成了