Last post Jan 24, 2013 10:08 PM by oned_gk
Jan 24, 2013 09:15 PM|helpmee|LINK
My question may be simple but i have the following error ocurred in my code when i try to debug.
protected void Button1_Click(object sender, EventArgs e)
String connectionstr = "Server=(local)/SQLEXPRESS;Database=db_Logininformation;User Id= jananni-PC/jananni;Password=;";
SqlConnection con = new SqlConnection(connectionstr);
com = new SqlCommand("select Password from userinformation where Username='" + TextBox1.Text + "'", con);
dr = com.ExecuteReader();
if (dr.ToString() == TextBox2.Text)
The error shown is :con.Open(); A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured
to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Jan 24, 2013 10:08 PM|oned_gk|LINK
String connectionstr = "Server=./SQLEXPRESS;Database=db_Logininformation ..........
Change (local) to dot