想在发生这combobox事件时得到访问数据库的记录值时.发生错误,不知是那里出错了,请高手指点.myBind=this.BindingContext [this.dataSet1 ,"product_papllication"];
以上是数据做了绑定private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
string s=this.comboBox1 .Text; //获取值
DataBinding(s);
MessageBox.Show(myBind.Position.ToString () ); //显示记录
}
以上是数据做了绑定private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
string s=this.comboBox1 .Text; //获取值
DataBinding(s);
MessageBox.Show(myBind.Position.ToString () ); //显示记录
}
----------
那应该是你根本没有取得数据回来
你可以查看一下数据源有没有数据