Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i use this code for connect to the SQL Server in my domain network


<add name="Database">
connectionString="server=192.168.0.13,1433;Network Library=DBMSSOCN;Initial Catalog=RayanehSanatPB;User ID=sa;Password=123456;"
providerName="System.Data.SqlClient" />


i have one sql server 2008 and my database are here
i want to all client use this sal database
but the application just running in the local machine that running SQl server
i cant conet to the sql server from another pc in my LAN
please help me
Posted

1 solution

- Check if tcp/ip is enabled for the server instance
- Check firewall
- Use a network tool (like Network Monitor) to catch the connection failure on tcp or ip level
- This connection string is useful in special cases[^], you should use the general connection string syntax[^]
(PS: never use SA to connect an application to the server! You are in a domain and you can add even AD groups as users to SQL server, thus use trusted connection. )
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900