读取记录给textbox,菜鸟来送分了``
从表里读数据,然后把读出的行记录分别辅值给textBox.
不懂,请教,不丢人``
------解决方案--------------------用sqldataadpater读取到dataset,然后想从dataset中的datatable读值到textbox
string selString2 = "select * from CostInvoice_TT where GoodsNumber = ' "+goodsNumber+ " ' ";
this.sqlDataAdapter2.SelectCommand.CommandText = selString2;
this.sqlDataAdapter2.SelectCommand.CommandType = CommandType.Text;
this.sqlDataAdapter2.SelectCommand.Connection = this.sqlConnection1;
this.dataSet12.Clear();
this.sqlDataAdapter2.Fill(this.dataSet12, "CostInvoice_TT ");
..... //这里不知道怎么写``
textBox1.Text = DataTable.Rows[1][1].ToString();
=======================================================================
填充 到 dataSet12 之后,,就用 这个记录集
textBox1.Text =dataSet12.Tables[0].Rows[1][1].ToString();
依次类推..................