I have a dbCtrlGrid linked to an ado datasource. After the user updates a record I re- query the datasource and the record updated is not returned by the query. I am trying to position the next record in the dataset on the panel that was active previously. The code below does not give the correct results
Any help would be appreciated.
adoDiary.next; // move to next record
recordno := adoDiary.fieldbyname('ref').asinteger; // save record number
activePanel := dbCtrlgrid1.PanelIndex; // save index of current active panel
doquery; // re query data
adoDiary.Locate('ref', recordno, ); // locate record
dbCtrlgrid1.PanelIndex := activePanel; //