Reputation: 655
I wrote a C# application that connects to a SQL server. I want to run this application on different computers (clients) in my network and make them connect to one central SQL server remotely.
I installed SQL Server 2008 only on the central computer, not on the clients.
The clients operating system will be Windows 7, 8 or Server 2012.
Should I need to install anything on the clients running my application in order to be able to connect to the SQL server? should I add DLLs to my application? or will it work naturally without problems?
Upvotes: 1
Views: 1550
Reputation: 1
It's very simple:
Install Sql server 2008 Mix Mode Not Install Only Windows Mode :- If you install mix mode they can ask for password
After that use App.config file for using connection for Software to Database
Connection String Use Intergrity Security= false; User Id="sa" Password="Enter Your Password"
Upvotes: 0
Reputation: 749
You will be able to connect fine without installing any additional dlls, just make sure that your connection string refers to the server that your SQL Server instance is on and uses the correct authentication method.
For SQL Server Authentication:
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
For Windows Authentication:
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
For instructions on how to allow remote connections on the server, enable TCP/IP connections, and configure the firewall, you can find very good instructions here, http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx.
Upvotes: 1
Reputation: 4159
You can connect naturally to your clients, you need just to check some basic network things like firewalls,etc. And make sure that your sql server is configured to accept remote connetions check this link to see how to do this
http://support.microsoft.com/kb/914277#method2
if you have some doubt about how to write the connection string to connect to your server, you can use this site to help you:
http://www.developerfusion.com/tools/sql-connection-string/
Upvotes: 2