title: java swing gui application with sql server 2005 as backend using windows authentication
body: <p>i get this error when i execute my java application in netbeans 7.0 ide, any help regarding this will be appreciated.</p>
  
  <blockquote>
    <p>SQL Exception:
    com.microsoft.sqlserver.jdbc.SQLServerException:
    The TCP/IP connection to the host
    PRANAVVENKAT-PC, port 1433 has failed.
    Error: "Connection refused: connect.
    Verify the connection properties,
    check that an instance of SQL Server
    is running on the host and accepting
    TCP/IP connections at the port, and
    that no firewall is blocking TCP
    connections to the port.".</p>
  </blockquote>
  
  <pre><code>try {
               Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
         String connectionUrl = "jdbc:sqlserver://PRANAVVENKAT-PC\\SQLEXPRESS;"+"databaseName=CallCenter";
          Connection con = DriverManager.getConnection(connectionUrl);
  
          PreparedStatement stat = con.prepareStatement("insert into customer (name,password)values(?,?)");
       String name=jTextField1.getText();
       String password=jPasswordField1.getText();
        stat.setString(1, name);      
        stat.setString(2, password);
        stat.executeUpdate();
  
       } catch (SQLException e) {
        System.out.println("SQL Exception: "+ e.toString());
      } catch (ClassNotFoundException cE) {
         System.out.println("Class Not Found Exception: "+ cE.toString());
      }  
  </code></pre>