日期:2014-05-18  浏览次数:20419 次

在gridview中实现删除多行时,调用sqldatasource得delete()有错
在gridview中实现删除多行时,想调用sqldatasource的delete()方法,sqldatasource的conflictdetection=compareallvalues 
有如下的提示信息:
You have specified that your delete command compares all values on SqlDataSource 'SqlDataSource1',
 but the dictionary passed in for values is empty. Pass in a valid dictionary for delete or change
 your mode to OverwriteChanges.
当 sqldatasource的conflictdetection=overwritechages时,
就没有问题,但是这样并发操作就得不到控制。
想 sqldatasource的conflictdetection=compareallvalues 时,实现多行删除,怎样解决上面的错误提示!

------解决方案--------------------
并发控制使用ObjectDataSource
------解决方案--------------------
可能是delete语句错了。
------解决方案--------------------
Command命令贴出来看看
------解决方案--------------------
http://forums.asp.net/p/1065422/1547310.aspx
SqlDataSource内在机制的问题