I am currently writing a windows form application in c#.
I am using Microsoft SQL Server Management 2008 R2 to store my data in the database.
My application work fine when I am using my own laptop because my server name in database is set to localhost.
However, this program will not work if I am trying on other people's laptop (cannot connect to my database).
I want to write a configure file for this program so that the user can access my windows form application anywhere.
I am sure sure how to get it done.
My servername is localhost and this is my SQL connection string in my Form1.cs. Help and example for reference will be appreciated, thanks
myConn = new SqlConnection("Server = localhost; Initial Catalog= dbName; Trusted_Connection = True");
Updated (I don't have password to connect)
<connsectionStrings>
<add name="myConn" connectionString="Data Source=PC6\SA;Initial Catalog=dbName;"/>
</connsectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
localhostto your ipaddress or sql server name