I\'m working on a local project and trying to connect to a local database. I have this class in it the connection string:
public class SQLConnection
{
public
Enable remote connections for SQL Server Express 2012 Most common problems are: 1) Your sql server express is not running. Check it in "sql server configuration manager" 2) server runs but don't allow remote connection. Use sql management studio to configure it.
A good (and easy) way to test if your SQL connection is working is to use a .UDL file. Simply create an empty text (.txt) file on your desktop and rename the extension to .udl. Double click and you'll be presented with a SQL connection window, fill in the details, test connection and then (when it's working) save. Close the window and rename the file extension to .txt. Open and inside you'll find your working connection string.