jdbc 怎样连接到sql server2000 我用的是MyEclipse ,我用的是DB Brower连接到sql server20000,但我不能连接到sql server2000.我用的是Windows xp,sql server2000我没有打补丁

解决方案 »

  1.   

    先补上Sp3以上的补丁,打补丁时先是解压,然后要运行一个bat文件才是打上,其次要下载驱动程序,之后你就可以试下了,找本书来看看就行了,不会的上来问大家。
      

  2.   

      
       写个向数据库插入的实例看看吧
          public class Dao{        public Connection getConn()
            {
                 Connection con=null;
           Class.forName("连接串");
           Connection con =DriverMager.getConnection("驱动"); 
                 return con;
            }         public void InsertTable()
                 {        
                      try
    {
                   Connection con=null;
                     Dao dao=new Dao();
                  String sql="INSERT INTO (表名)"; 
                   PreparedStamenent pst=null;
                    con=dao.getConn();
                    con=pst.getPreparedStament(sql);
                      pst.exequ();
                  
              }catch(Exception e)
               {
                   System.out.Println(e);
                }
              //关闭就省略了
                 }
    }