MSTables connect to Grid has duplicates

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
JGordon
Posts: 10
Joined: Tue 27 Sep 2011 16:43

MSTables connect to Grid has duplicates

Post by JGordon » Wed 23 Jan 2013 15:54

Hi,
I have been searching for a problem and I am not sure where it's at. I am using version 6.28 with infopower grids. I have a table that is hooked to a grid. I have a routine that appends records to that table. The record it adds may not be in the order of the index of the table. So, let say the table has an index with on a field UserName and the grid is showing that. The records being added to the empty table is Beth then Joe then Mary then Sam then Karen. Now the grid is showing the wrong list. It has some lines duplicated. The table record count is correct. The number of rows in the grid is wrong.

I have tracked it down and it seems to happen in the Post whenever the current record is going to move to a different position in the table (in this case Karen is moved to the third record). The problem seems to be in the UpdateRowCount of the grid. In tracking it I find the SDac table rountine have a FRecordCount which is one value but the grid uses the DataSource.DataSet.FRecordCount which is a different value and the 2 do not match.

As I said, I am not sure this is your problem but I am curious if you have seen this before and should the MSTable.FRecordCount be the same as DataSource.DataSet.FRecordCount or is this an oversight.

Thanks,
J Gordon

AndreyZ

Re: MSTables connect to Grid has duplicates

Post by AndreyZ » Wed 23 Jan 2013 16:02

Hello,

Please try to reproduce this problem using the standard TDBGrid component. If it does not occur with TDBGrid, please write about this problem to the InfoPower support.

Post Reply