大家帮忙看看这个问题
private void button1_Click(object sender, EventArgs e)
{
String name = textBox1.Text;
String password = textBox2.Text;
String repassword = textBox3.Text;
if (password.Equals(repassword) == false)
{
MessageBox.Show("两次输入的密码不一致.请重新输入");
}
SqlConnection con = new SqlConnection("Data Source=localhost;Initial Catalog=db;Integrated Security=SSPI");
con.Open();
SqlCommand com = new SqlCommand("insert into users(username,password) values('" + textBox1.Text + "','" + textBox2.Text + "')", con);
com.ExecuteNonQuery();
con.Close();
MessageBox.Show("恭喜!注册成功!!!");
}
提示连接数据库服务器出现的网络错误,怎么弄 急。。。。。。。。。。。。。。。。。。。。。