Visual Studio

Visual Studio includes the 'Data Source Configuration Wizard' for most common data sources, so the chances are a connection wouldn't need to be manually coded. Other features include:

Imports (Using Entity Framework)

Connection Strings

A ConnectionString property consists of a connection string for an OleDbConnection object. This enables the application to establish a connection with the database object and provide authentication data.
An example of a simple connection string:
Provider=SQLOLEDB.1;Data Source=MySQLServer;Initial Catalog=NORTHWIND;Integrated Security=SSPI The following is a connection string from an ASP.NET MVC project's 'Web.config' file:
add name="DatabaseEntities" connectionString="metadata=res://*/Models.DatabaseEntityModel.csdl|res://*/Models.DatabaseEntityModel.ssdl|res://*/Models.DatabaseEntityModel.msl;provider=System.Data.SqlClient;provider connection string="data source=SQLSERVERNAME1,3023;initial catalog=DatabaseName;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /> Authentication could be username/password, or use Windows Integrated Security (SSPI). The latter is recommended where possible, to avoid compiling the application with a username/password combination.

References

MSDN: Connecting to Data in Visual Studio Overview. https://msdn.microsoft.com/library/wxt2cwcc(v=vs.90).aspx