Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 25, 2013 02:08 AM by oned_gk
Jan 25, 2013 01:15 AM|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 25, 2013 02:08 AM|LINK
String connectionstr = "Server=./SQLEXPRESS;Database=db_Logininformation ..........
Change (local) to dot