为什么数据不能更新。。。。。?答对给分。。。。
private void button1_Click(object sender, System.EventArgs e)
{
this.oleDbConnection1.Open ( ) ;
// 打开数据连接oleDbCommand1.CommandText
string udstr="UPDATE Persons set name='"
+textBox2.Text+"', HomePhone='"
+textBox3.Text+"', WorkPhone='"
+textBox4.Text+"', City='"
+textBox5.Text+"',Address='"+textBox6.Text+"',Email='"+textBox7.Text+"' WHERE (id="+textBox1.Text+")";
//string newstr="update persons set name="+textBox2.Text+" where id ="+textBox1.Text+"";
OleDbCommand cmd = new OleDbCommand (udstr, oleDbConnection1) ;
this.oleDbConnection1.Close();
MessageBox.Show("数据存储成功!"+udstr,"系统提示:");
}