I use MS SQL DB and MSQuery component. There is a sampling from several tables (stored proc). I need to insert one record and update only it. The dataset has a lot of records and Refresh works for a very long time. Tried to do the following. In the CachedUpdates mode I add an entry to the dataset
Code: Select all
RefreshId := DocumentIns(200, Ar, Self, nil, qryMain);
try
qryMain.ReadOnly:= false;
qryMain.Insert;
qryMain.FieldByName('wa_remont_bills_aid').AsInteger:= DO_InternalID(RefreshId);
qryMain.Post;
finally
qryMain.ReadOnly:= true;
end;
after that I insert the record in the database through the request and try refresh
Code: Select all
qryMain.Locate('wa_remont_bills_aid', ID, []);
qryMain.RefreshRecord();
But the record disappears and appears with full Refresh