翻翻过去那场雪
以前用过vs2005 现在几乎不怎么玩编程了,所以不一定管用,我个人建议:1、user表能不能改改,有可能是关键字啊!(忘记了)2、既然this.txtname.Text已经是字符串类型了你还加什么引号呢?所以没必要。所以你的问题是数据库写入没有写好.建议用string strss = "insert into user(username,password,useraddress,usermessager) values(" + this.txtname.Text + "," + this.txtpwd.Text + "," + this.txtaddr.Text + "," + this.txtbeizu.Text + ")";stress解释出来就是insert into user(username,password,useraddress,usermessager) values(this.txtname.text,this.txtpwd.text,this.txtaddr.text,this.txtbeizu.text);