title: how to connect remote ms-sql database using jsp
body: <p>Hello i have mssql database in Remote place system and now,i want to connect that database in my jsp page.i am knew in mssql , so kindlly help me how to connect remote place MSSQL database with jsp. i try following code. is there any things missing? to connect jsp page with mssql? thank you in advance</p>
  
  <pre><code>    try{
  
              SQLServerDataSource ds = new SQLServerDataSource();
              ds.setUser("user");
              ds.setPassword("****");
              ds.setServerName("SERVER-NAME");
              ds.setPortNumber(port); 
              ds.setDatabaseName("DB");
              Connection con = ds.getConnection();
  
  
  
       }
       catch(ClassNotFoundException cnfex)
        {
  out.println(cnfex.toString());
  cnfex.printStackTrace();
       }  
  </code></pre>
  
  <p>This is Edited code. so kindlly help. how to finish this stuff.</p>