数据显示在textBox中
我现在有一个表,表是这样的
Line_ID Company_Name Price
1 湖南....公司 1
2 湖南....公司 2
.. ......... ..
现在我想把读取的Company_Name和Price显示在textBox1中,我写了一下,没有成功,请高手指点一下
string Qryxinxi="select Company_Name ,Price from Businfo where Line_ID="+"'"+this.textBox2.Text.ToString().Trim()+"'";
Qrychecnn=new SqlConnection(this.Qrychestr);
Qrychecnn.Open();
SqlCommand comd=new SqlCommand(Qryxinxi,Qrychecnn);
SqlDataReader re=cmd.ExecuteReader();
while(re.Read())
{
this.textBox1.Text += re["Company_Name"].ToString()+re["Price"].ToString();
}