ADO and ADO.NET Data Source Connection Strings

Your application’s Web.config file should specify the name of the Microsoft SQL Server, not the path of the database file.

If the database is on the same machine as the application, you can use:

Data Source=(local)

If the database is on another machine, and you know the name of the Microsoft SQL Server instance, you can use:

Data Source=MySQLServerName

(Please note that this is not the same as the machine name or the host name, such as MyDomain.com.  It is the name of the Microsoft SQL Server).

If the database is on another machine, you can also use the IP address of the machine:

Data Source=192.168.0.1

See Also

Collection of ADO and ADO.NET connection strings:

http://www.carlprothman.net/Default.aspx?tabid=81

See Also

Web.config Configuration File