更新表数据出错?
情况如下:
Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.InvalidOperationException: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
源错误:
行 133: ds1.Tables["xt"].Rows[0][1]=50000000;
行 134: //ds1.Tables["Govdutylog"].Rows[0][4]=DateTime.Now;
行 135: Rsadp1.Update(ds1,"xt");
不知道是什么原因了,我换成以前建的表是可以更新的,但新建的表更新都不行,只能插入。为什么?请大家帮助一下,谢谢。