If you want to connect the Local Database and Windows Authentication then as i shown below
myconnection=new SqlConnection("Data Source='SqlServername';Database='Databasename';Integrated Security=True");
If u connect with the server database and with SQL Server Authentication
Data Source='IPADDRESS';Database='DATABASE NAME';User='USERNAME';password='PASSWORD'