title: Connecting to DB using JDBC driver with different user login
body: <p>I have opened sql with other user (Shift+Right click and run as different user) by providing user name and password, hence when I connect to SQL Server, with windows authentication am able to access the DB's and tables.</p>
  
  <p>Now, can I do this using Java? When I use below code:</p>
  
  <pre><code>conn = DriverManager.getConnection("jdbc:sqlserver://ServerName;Database=Testing;integratedSecurity=true");
  </code></pre>
  
  <p>Error:
  Login failed for user so and so. This is actually correct because it is taking the login information of system I am currently using.</p>