本文介绍了数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将一个表(由数据源配置向导"添加的表)拖放到
如您所知,Visual Studio会创建TableAdapter,DataSet,..并自动添加一些代码.
但是当我删除一行并要保存时会出现错误:
<<更新要求=" a ="有效=" deletecommand ="当="传递=" datarow =" collection ="与="删除="行.=" >>
I drag and drop a Table (which I added by "Data Source Configuration Wizard" ) on the
form .as you know visual studio create TableAdapter,DataSet ,..and adds some code automatically .
but when I delete a row and want to save it gives error :
<<update requires="" a="" valid="" deletecommand="" when="" passed="" datarow="" collection="" with="" deleted="" rows.="">>
private void nameBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.nameBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.dtDataSet);//Error occurs here
}
推荐答案
这篇关于数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!