Basically, you connect to a database by using
Connection Strings[
^]. This will, of course depend on what database server do you want to connect to. Check
here[
^] for the different connection strings. You also need to familiarize yourself with
ADO.Net[
^] in order to connect to the database, using the connection string. Most of the classes that you will need are in
System.Data.SqlClient[
^] namespace so make sure you check on it as well.