string sqlConn = "Data Source=USER-PC\CompanyName;Initial Catalog=rack;User ID=trial;Password=trial112";
If it's local PC, use dot as :
If you are struggling with name try to ping User-PC\CompanyName...
The syntax of connection is:
Default port(SQL) - 1433
Verify you can connect.
When you initialize any string make sure that escape special charcters..
\ is a special charcater and you need to escape it as \