title: Connect remote SQLServer Database programmatically using VPN
body: <p>I can connect to VPN and I can access Sql Server using RDP. Now, I want to access the Sql Server programmatically. </p>
  
  <p>I connected to the VPN and then have the following connection string set up:</p>
  
  <p>****constr = 'Data Source=servername;Initial Catalog=dbname;User ID=username;Password=passwd;'**</p>
  
  <p><strong><em>error: login failed for username</em></strong></p>
  
  <p>PS:
  username and the password are the ones that we use to access the server remotely using RDP. and the sql server is windows authenticated and the permission is enabled for the given username.</p>
  
  <p>I appreciate ur help. </p>