I'm during my steps using db within an application so transpire is to construct simple db with one table on your own to be able to improve and learn

I've opened up new db while using visual studio : Tolls -> connect with database and introduced him to produce new database

the next phase ended up being to populate a table with 4 posts (the all 4 are nchar(10))

after which (without any actual data inside )i attempted this code:

      try
        {
            // step 1: create a SqlConnection object to connect to the
            // SQL Server my server connection string proprties  database
    // i think the bug should be here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            SqlConnection mySqlConnection = new SqlConnection("Data Source=./SQLEXPRESS;AttachDbFilename=C:/Users/STERN/Documents/myDB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");//"server=localhost;database=Northwind;uid=sa;pwd=sa");
            // step 2: create a SqlCommand object
            SqlCommand mySqlCommand = mySqlConnection.CreateCommand();
            // step 3: set the CommandText property of the SqlCommand object to
            // a SQL SELECT statement that retrieves a row from the Customers table
            mySqlCommand.CommandText =
            "SELECT type " +
            "FROM Table1 " +
            "WHERE type = ‘ALFKI’";
            // step 4: open the database connection using the
            // Open() method of the SqlConnection object
            mySqlConnection.Open();

/* some code .... */

catch (SqlException e)
        {
            Console.WriteLine("A SqlException was thrown");
            Console.WriteLine("Number = " + e.Number);
            Console.WriteLine("Message = " + e.Message);
            Console.WriteLine("StackTrace:\n" + e.StackTrace);
        }
        string s = Console.ReadLine();
    }

in which the exception i recieve is throwen by mySqlConnection.Open() this is actually the error massage i recieve :

A SqlException was tossed Number = 3 Message = A network-related or instance-specific error happened while establishi ng an association to SQL Server. The server wasn't found or wasn't accessible. V erify the instance title is correct which SQL Server is set up to any or all ow remote connections. (provider: Named Pipes Provider, error: 40 - Couldn't op en an association to SQL Server) StackTrace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception , Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternal ConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Bool ean secure, Boolean trustServerCert, Boolean integratedSecurity) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeo ut, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection ow ningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnecti on owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, St ring newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdent ity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOp tions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConn ection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection possessing Object) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection o wningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection ownin gObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection ow ningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection ou terConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at ConsoleApplication1.Program.Primary(String[] args) in C:UsersSTERNAppData LocalTemporary ProjectsConsoleApplication1Program.cs:line 29

if a person is aware of pdf , article ,something which is needed me it might b excellent of him to create it lower here... can someone help me....