1 Reply Latest reply on Jan 8, 2002 4:39 PM by garymarsh

    bug report about MS SQLSERVER2000 JDBC DRIVER

    thisfellow

      i find that there is a bug in "MS SQLSERVER2000 JDBC DRIVER".

      Env:
      Server:
      ms w2k server
      ms sql2k server

      Client:
      ms w2k professional
      ms sql2k jdbc driver
      sun jdk1.3

      Test Code:
      conn = DriverManager.getConnection
      ("jdbc:microsoft:sqlserver://jupiter:1433","erp","erp");
      String insertEntitySQL = "INSERT INTO Sale (saleNo, logName, logDate,
      status, salesmanID, dataLine, wareHouseNo) VALUES (?, ?, ?, ?, ?, ?, ?)";
      ps = conn.prepareStatement(insertEntitySQL);
      ps.setString(1,"s2");
      ps.setString(2,"ma zhen duo");
      ps.setTimestamp(3,new Timestamp(System.currentTimeMillis()));
      ps.setInt(4,0);
      ps.setString(5,"smID2");
      ps.setTimestamp(6,new Timestamp(System.currentTimeMillis()));
      ps.setString(7,"w2");

      int affectedRows = ps.executeUpdate();
      System.out.println("affectedRows:" + affectedRows);

      Result: 0
      The correct resutl of test is 1.

      so,when you create a cmp,exception will rise.