请问下面这条语句有什么问题?

来源:百度知道 编辑:UC知道 时间:2024/05/27 04:05:52
string str="select * from tb_Member where 姓名='"+TextBox1.Text"'and 性别='"+TextBox2.Text+"'and 籍贯=
'" +TextBox3.Text"'";

两边都得有加号啊,为什么textbox2有,其他两个只有一边有呢?正确的应该是这样的:
string str="select * from tb_Member where 姓名='"+TextBox1.Text+"'and 性别='"+TextBox2.Text+"'and 籍贯=
'" +TextBox3.Text+"'";

+TextBox1.Text,为什么要个加号?