I have C# .net project with SQL Server 2008 written in Visual Studio 2008. There I used the following connection string to connect with SQL Server:
string co
Here is a sample;
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PressbyranDB.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True
Note that Data Source=.\SQLEXPRESS; attribute as your SQL Server and Server Instance name. Also, you do not need to restore your database from machine to machine if you use the AttachDbFilename= attribute.