Connecting C# with SQL Server Database in a Local Area Network (LAN) -


i have created c# application want run on local area network, different pcs can install application , access database stored on server pc. point rookie when comes network connectivity. right use code connect database:

public sqlconnection con = new sqlconnection("data source=localhost; initial catalog= my_db; integrated security= true"); 

can guys me this? in advance.

p.s. have install sql server management studio in server pc?

obviously current connection string clients trying connect own computers. should use "server=yourserveraddress;database=yourdatabase;user id=username; password=password;" instead.


Comments