title: Java jTDS Connection Problems Ubuntu Server
body: <p>From what I have read the correct connection string for a jTDS is:</p>
  
  <pre><code>jdbc:jtds:&lt;server_type&gt;://&lt;server&gt;[:&lt;port&gt;][/&lt;database&gt;]
  </code></pre>
  
  <p>I believe the issue is the server name.  The server name is formatted like this </p>
  
  <pre><code>servername\adhoc
  </code></pre>
  
  <p>An SQLException gets thrown anytime I try to connect saying "unknown server host name"</p>
  
  <p>Is that my issue, or is there something else I need to look into as well...?</p>
  
  <pre><code>import java.sql.*;
  
  public class Main {
  
    // The JDBC Connector Class.
    private static final String MSdbClassName = "net.sourceforge.jtds.jdbc.Driver";
    private static final String MSHOST = "servername\\adhoc";  //cascrmeufosqlp1\adhoc
    private static final String MSDATABASE = "tier2";
    private static final String MSUSER = "feed_****2";
    private static final String MSPASSWORD = "*******0";
  
    public static void main(String[] args) throws ClassNotFoundException,SQLException
    {
      Class.forName(MSdbClassName);
      String url2 = "jdbc:jtds:sqlserver://" + MSHOST + ":1433/" + MSDATABASE;
      Connection c2 = java.sql.DriverManager.getConnection( url2, MSUSER, MSPASSWORD );
      System.out.println("MS SQL works...");
      c2.close();
    }
  }
  </code></pre>