firstly I would look at the following 2 sites
1. How to construct a connection string, here you can learn how to create the connection string depending on your version of SQL Server
Connection Strings Website
2. first example of connecting using ado.net
ado example