Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Guys,

I really need help. I have C# windows application and I want to connect to SQL from other computer and the Internet Access should be different, for example, I have SQL from one City and I want to connect it from other City.

I just need the connection code.

Regards,
Karam Ibrahim

What I have tried:

I know how to connect to SQL via same Internet Access via WiFi.
Posted
Updated 2-Mar-18 1:23am

1 solution

It's exactly the same, provided teh SQL server instance is configured to allow remote access. If it isn't, then you can't do it no matter what you try.

All you need is the right IP address or Domain Name in the connection string instead of your "local" information. The DB Admin for the SQL Server instance you want to connect to should be able to give you all the info you need, including the appropriate Username and password to use - remote connections never use Integrated security as it's too insecure.
 
Share this answer
 
Comments
Karam Ibrahim 2-Mar-18 7:32am    
Dear I know the IP address for that but sometimes the IP address will be the same name.
OriginalGriff 2-Mar-18 7:38am    
Do you want to try explaining that again? It makes no sense to me as written.

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