对,dsn要做成系统的
其实也不难
我这儿有连接的java程序
你要的话留下MAIL我可以给你发

解决方案 »

  1.   

    String driver = "";
    Class.forName(driver);                     
    Connection conn=DriverManager.getConnection"jdbc:odbc:dsn","sa","");
      

  2.   

    Statement stmt=conn.createStatement();
       stmt.executeUpdate("insert into ....");
    Do u understand???
      

  3.   

    数据库一定要加到系统dsn里吗,能够象ado那样用连接串吗,这样方便
      

  4.   

    我已经连接成功了我的这个程序可以从ACESS中读数据(用getstring())
    也可以更新数据库(先setCommit(true);在updateRow();)
    但后来一个同样的程序却不能正常工作,有机会,我把源程序贴出来
      

  5.   

    以下是代碼連接:try
        {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         String sourceURL=new String("jdbc:odbc:test");//test時資料來源
         DBConn=DriverManager.getConnection(sourceURL);
         statement=DBConn.createStatement();
         statement.executQuery("select * from .....);
        }
        catch(ClassNotFoundException e)
        {System.out.println(e);}
        catch(SQLException e)
        {System.out.println(e);}
      }在Jbuilder中可以直接用控件連接,代碼不用寫自己給出,
    具體去看看Jbuilder中Help->Dataexpress Refrence中有例子,還有圖,非常清楚,自己看吧