string oracle;
if(this.textBox1.Text == "1")
{
oracle = "select 1 as A from dual "
}
else
{
oracle = "select 1 as B from dual "
}
this.dataSet3.Clear();
this.dataGrid1.Refresh();
this.connection1.Open();
this.adapter.SelectCommand = this.cmd;
cmd.CommandText = oracle;
this.adapter.Fill(this.dataSet3);
this.connection1.Close();1.当我第一次在textBox1输入1时,点击“确认”按钮,在dataGrid种显示
A
---
1
2.当我在textBox1输入2时,再次点击“确认”按钮,在dataGrid种显示
A   B
-----
空  1
为什么在第二次点击的时候会留下第一次查询时的“行头名”?
怎么才能去掉A这一列?