开发者

ADOQuery and DBNavigator

OK. I have simple Database ,DBGrid and DBNavigator . I use this code for my adoquery and view in this in my DBGrid

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

The problem is that if i have two or more the same article from 1 and i try to delete it from DBnavigator it send me

Key column information is insufficient or incorrect开发者_开发技巧.Too many rows were affected by update. I want to delete two or more rows.Not only one. How to fix that ?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜