title: Java JTDS to SQL server 2000
body: <p>ive got a method that connects to sql server using JTDS</p>
  
  <pre><code>String url = "jdbc:jtds:sqlserver://192.168.12.123;instance=server-e61t7rvb;DatabaseName=test";
       String driver = "net.sourceforge.jtds.jdbc.Driver";
      String userName = "sa";
      String password = "hello";
  
                  Class.forName(driver);
          conn = DriverManager.getConnection(url, userName, password);
          System.out.println("Connected to the database!!! Getting table list...");
          DatabaseMetaData dbm = conn.getMetaData();
          rs = dbm.getTables(null, null, "%", new String[] { "TABLE" });
          while (rs.next())  System.out.println(rs.getString("TABLE_NAME"));
  </code></pre>
  
  <p>using this i can connect fine to SQL 2008 but when i change it to a SQL 2000 server i get "server has no instance named "
  for the instance name i am running </p>
  
  <pre><code>select @@servername 
  </code></pre>
  
  <p>note that i can use the instance name to log into the server from my computer using sql management studio.</p>
  
  <p>any help much appreciated</p>