How do you remotely connect to SQL Server Express Editions?
I have the connection working locally but now I want to connect to the database from another computer on the internet.
It looks like I will have to change the SQL Server Express Editions settings so I can do another search for that. My question on this forum is mainly if anyone knows what my C# code should look like. If you can provide an example that would be much appreciated.
Dharmesh SharmaPosted Sep 21, 2009, 1:38 AM
just to know some thing
1. Internet is working well not tool slow.
2. know IP address or domain name of to want to cannect
3. User id for server authentication.
4. password also
now to try to caoonect remote server to by own sql server
look like this
and code is
and use this connection to where u use
Kirtan PatelPosted Sep 20, 2009, 5:19 AM
,Here is What you want
dont forget to mark "Do you like this answer" please it will give me some credits :)
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data Source=Server_IP_Here;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;");
con.Open();
//Now Performa Query Etc Here
}
And In Sql Server Configurate Make sure You have enabled remote connections
See below Image
Serban CosminPosted Sep 20, 2009, 5:09 AM