0

好的。我有简单的数据库、DBGrid 和 DBNavigator。我将此代码用于我的 adoquery 并在我的 DBGrid 中查看

select Count(*)As 1 , 2 3 from Table1 Group by 1, 2

问题是,如果我有两个或更多来自 1 的相同文章,并且我尝试从 DBnavigator 中删除它,它会发送给我

键列信息不足或不正确。更新影响的行数过多。我想删除两行或更多行。不仅仅是一个。如何解决?

4

1 回答 1

0

I guess it won't be possible using DBNavigator in a usual way (without override delete button event), because the dataset holds more than one record in a DBGrid row and IMHO the grid doesn't take care if you have data in a group. I would say if you select some grouped row and try to delete it, "DBNavigator" checks if there is some primary (unique) key for a row, but in this case, there is no one.

But it's just my notion, I can't verify it now.

于 2011-02-04T14:41:51.130 回答