title: JDBC Example for java
body: <p>I have downloaded JDK 6 and also I have sqljdb4.jar and I have database.properties file that content the following data </p>
  
  <pre>
  database.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  database.url=jdbc:sqlserver://.;databaseName=UserInfo;integratedSecurity=true; 
  database.username=sa
  database.password=admin
  </pre>
  
  <p>B.N : I'm installing the server on my machine and the server name = . , also I'm using Windows Authontication</p>
  
  <p>My problem now is when I try to create connection I have the following error</p>
  
  <blockquote>
    <p>com.microsoft.sqlserver.jdbc.SQLServerException:
    The TCP/IP connection to the host
    localhost, port 1433 has failed.
    Error: Connection refused: connect.
    Please verify the connection
    properties and check that a SQL Server
    instance is running on the host and
    accepting TCP/IP connections at the
    port, and that no firewall is blocking
    TCP connections to the port.  at
    com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)</p>
  </blockquote>
  
  <p>I don't know what is the exact problem here</p>
  
  <p>If any one can help I will be appreciated</p>
  
  <p>Thanks in Advance</p>