How to connect to SQL server express edition software?

Asked By 10 points N/A Posted on -
qa-featured

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.

SHARE
Answered By 30 points N/A #130151

How to connect to SQL server express edition software?

qa-featured

 

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))
    {
        connection.Open();
        Console.WriteLine("ConnectionString: {0}", 
             connection.ConnectionString);
    }
}
Thanks 

Sincerely,

Lorraine P Goodman

Related Questions