Query - DataChange notification too often when opening
Posted: Sun 06 Apr 2008 22:51
Hello,
I've recently encountered a problem with using SDAC (and MyDAC). If I connect a grid control to the Query (via DataSource) I get the OnFocusedRowChanged event (in grid) fired 3 times after I use Query.Open().
I've found out that other DataSet components that I use don't produce this problem so it is related to SDAC. This can be easily reproduced by testing TDataSource.OnDataChange and TDataSource.OnStateChange.
TMsQuery.Open() fires:
DataSet.Open() should fire:
I'm not sure, but I think that this problem wasn't always present in SDAC. Please check this because I'm doing intensive calculations when the selected record changes and right now they are done 3 times instead of once.
Best regards,
Crafty
I've recently encountered a problem with using SDAC (and MyDAC). If I connect a grid control to the Query (via DataSource) I get the OnFocusedRowChanged event (in grid) fired 3 times after I use Query.Open().
I've found out that other DataSet components that I use don't produce this problem so it is related to SDAC. This can be easily reproduced by testing TDataSource.OnDataChange and TDataSource.OnStateChange.
TMsQuery.Open() fires:
Code: Select all
TDataSource.OnDataChange
TDataSource.OnStateChange
TDataSource.OnDataChange
TDataSource.OnDataChange
TDataSource.OnDataChange
Code: Select all
TDataSource.OnDataChange
TDataSource.OnStateChange
TDataSource.OnDataChange
Best regards,
Crafty