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("恭喜!注册成功!!!");
}
提示连接数据库服务器出现的网络错误,怎么弄 急
{
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("恭喜!注册成功!!!");
}
提示连接数据库服务器出现的网络错误,怎么弄 急
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货