I have an app I developed that uses a sql server.

Rick DeRousse 0 Reputation points
2023-06-20T21:11:49.3466667+00:00

I installed the SQL server on Windows Pro 10. I can access the app from my pc but get the 'can't find the SQL server' error when trying to access from another PC. Not firewall, or SQL database config. It is set to allow remote connections. I can connect with my app using SQL authentication or Windows authentication from my PC but no others. Why can the app not find the SQL server but i can connect using PowerShell, etc ? What is am I missing, will this only work if I move the SQL server over to a server and not run it on a Windows Pro 10 PC? Even though Microsoft says it should work on a Windows 10 computer.

Thanks

Rick

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,000 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 112.7K Reputation points MVP
    2023-06-20T22:03:50.7666667+00:00

    You should not have the named-pipes path in the connection string. If the instance name is SQLEXPRESS, the parameter for Data Source should be MACHINENAME\SQLEXPRESS. If the language is C#, you need to double the backslash, so that it does not function as an escape character in the string literal.


  2. AniyaTang-MSFT 12,446 Reputation points Microsoft Vendor
    2023-06-21T06:51:16.2766667+00:00

    Hi @Rick DeRousse

    Here is a document for a network-related or instance-specific error while establishing a connection to SQL Server: https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/network-related-or-instance-specific-error-occurred-while-establishing-connection. You can refer to these steps to check.

    Best regards,

    Aniya


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.