c#通过在textbox.Text输入查询的要求查询数据库内容

  1. 图片说明求大神指点

姓名是字符串类型!要加单引号的
例如 select * from Table_1=‘ “ +textBox1.Text+” ’"

sql语句定义那一块

*  string searchString="select * from Table_1  where 姓名=‘“+textBox1.Text+”’";
  • string searchString="select * from Table_1 where 姓名=‘“+textBox1.Text+”’";

String sqlcoms = "select * from " + comboBox4.Text + " where 表列名= ' " + textBox1.Text + " ' ";