How to connect to SQL server express edition software?

Asked By 10 points N/A Posted on -

Hi. I have developed a project using ASP.NET, PHP, C# and connected to SQL server xpress edition software but when I execute project, it does not accept default user name and pass. I have checked all files and coding but user account does not work. Please help me as everything of project is working properly.

Answered By 30 points N/A #130151

How to connect to SQL server express edition software?



Hi Emileekeila

Good day!!

The following code fragment opens a new SqlConnection, displays the connection string in the console window, and then closes the connection when exiting the using code block. You can follow this step.

private static void OpenSqlConnection()
    // Retrieve the connection string.
    string connectionString = GetConnectionString();
    using (SqlConnection connection = 
        new SqlConnection(connectionString))
        Console.WriteLine("ConnectionString: {0}", 


Lorraine P Goodman

Login/Register to Answer

Related Questions