title: How to connect a C# windows form to a SQL Server database on another computer?
body: <p>I was wondering why I can't connect my application (C# Form from another pc) to my SQL Server?</p>
  
  <p>I have followed these links, and use Virtual Box as my VM.</p>
  
  <p><a href="https://www.youtube.com/watch?v=aIovZluNmNs" rel="nofollow noreferrer">https://www.youtube.com/watch?v=aIovZluNmNs</a></p>
  
  <p><a href="https://stackoverflow.com/questions/20172858/how-to-connect-to-sql-server-from-a-c-sharp-program-on-another-computer">How to connect to SQL Server from a C# program on another computer</a></p>
  
  <p><a href="https://stackoverflow.com/questions/9738629/connecting-to-sql-server-from-another-computer">Connecting to SQL server from another computer</a></p>
  
  <ul>
  <li>Enable TCP/IP from the Configuration Manager</li>
  <li>Use TCP Port 1433 (IPALL)</li>
  <li>Restart SQL Server from the Configuration Manager</li>
  <li>Added TCP Port from the Firewall (also UDP Port 1434, and SQLServer.exe), both server and VM</li>
  <li>From my VM, I can ping my server ip (192.168.1.10)</li>
  </ul>
  
  <p>But I still get this error</p>
  
  <blockquote>
    <p>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)</p>
  </blockquote>
  
  <p>Connection strings that I have tried are:</p>
  
  <pre><code>Data Source=ip_address,1433; Initial Catalog=inventory; Integrated Security=True
  Data Source=server_name,1433; Initial Catalog=inventory; Integrated Security=True
  Data Source=ip_address,1433; Initial Catalog=inventory; Integrated Security=False
  Data Source=server_name,1433; Initial Catalog=inventory; Integrated Security=False
  </code></pre>