I was wondering why I can't connect my application (C# Form from another pc) to my SQL Server?
I have followed these links, and use Virtual Box as my VM.
https://www.youtube.com/watch?v=aIovZluNmNs
How to connect to SQL Server from a C# program on another computer
Connecting to SQL server from another computer
- Enable TCP/IP from the Configuration Manager
- Use TCP Port 1433 (IPALL)
- Restart SQL Server from the Configuration Manager
- Added TCP Port from the Firewall (also UDP Port 1434, and SQLServer.exe), both server and VM
- From my VM, I can ping my server ip (192.168.1.10)
But I still get this error
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.)
Connection strings that I have tried are:
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