数据库已通过dataAdapter连接 程序运行时报错“对于不返回任何健列信息的select command不支持delete command的动态SQL支持” 什么意思啊?
try
{
cTable.Rows[dataGrid1.CurrentCell.RowNumber].Delete ();
customerDA.Update(customerDS,"contact");
customerDS.AcceptChanges();
}
catch (Exception ex )
{
MessageBox.Show("Error: \n" + ex.Message );
//this.UpdateTextBoxes();
return;
}
try
{
cTable.Rows[dataGrid1.CurrentCell.RowNumber].Delete ();
customerDA.Update(customerDS,"contact");
customerDS.AcceptChanges();
}
catch (Exception ex )
{
MessageBox.Show("Error: \n" + ex.Message );
//this.UpdateTextBoxes();
return;
}
解决方案 »
- 新人求教!
- 用什么方法可以利用显卡进行运算?
- vs.net中的textbox控件,在鼠标 按下光标总是最前面,无法地位到想要的位置
- 如何在C#中构建一个通用的dataReader的方法?
- 请看一下我的string转byte[]有错吗?为什么用它保存到以image为类型的数据库字段中提示类型出错
- 请问在C#中,怎样在文本框中,按回车键后触发另一个按钮的事件 ?
- TreeView及ListBox问题!!!
- 刚做好的winform.net程序有关薪资及人事档案管理方面[简单],征求大家的建议
- #region虽好,但还是有一个问题...(见内)
- C#的好网站收集+散分~~
- 请帮忙看看下面Synchronized语句起什么作用?
- 求C# primer电子版
customerDA.Update(customerDS,"contact");语句之前添加:SqlCommandBuilder scb=new SqlCommandBuilder(customerDA);应该就可以了,如果在不行,就在数据源的表中添加一个主键,之后绝对可行。