Reputation: 550
Please I have a little issue with an application I am developing. I developed the application so that another system can connect to it vi a network. The connected system should be able to access the database of the application from the other system. the application is developed in C# and uses SQL server as database. I want the application installed on two system with one of the systems hosting the database and the other accessing it over the network. Below is a my config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="NewConnectionString"
connectionString="Data Source=.\SQLSERVER;AttachDbFilename=C:\Hospital\HospitalDB.mdf;Integrated Security=True; User Instance = False"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
please any help wll be deeply appreciated .
Upvotes: 0
Views: 1617
Reputation: 4860
Your connection string specifies that DB engine should attach a local database file, rather than connect to remote server.
See ConnectionStrings.com to find suitable connection string for your purpose.
Upvotes: 5