1 Reply Latest reply on Nov 15, 2001 7:07 AM by Andrea Cervellati

    connection problem with microsoft  driver

    dorit Newbie

      Hi
      I have problem in getting a simple connection.

      my code is:

      new com.microsoft.jdbc.sqlserver.SQLServerDriver();
      Connection conn = DriverManager.getConnection(url, login, password);

      I keep getting the exception:

      java.lang.NoClassDefFoundError: com/microsoft/util/UtilDummyPrintWriter

      I checked and the msutil.jar is in the classpath.

      any help will be appreciate

      Dorit

        • 1. Re: connection problem with microsoft  driver
          Andrea Cervellati Newbie

          Hi,

          try the classic connection code:

          try {
          Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
          con = DriverManager.getConnection(url,username,password);

          // ...


          } catch(SQLException ex) {
          System.out.println("SQLException: " + ex.getMessage());
          }
          catch(ClassNotFoundException e) {
          System.out.println("ClassNotFoundException: "+ e.getMessage());
          }

          Hope this help.

          Bye