Page 1 of 1

Refresh only one record afret insert

Posted: Wed 10 Apr 2019 10:36
by greg1982
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

Re: Refresh only one record afret insert

Posted: Mon 15 Apr 2019 13:34
by Stellar
Unfortunately, we can't reproduce the issue. To investigate this behavior of UniDAC, please compose a small sample demonstrating the issue and send it to us, including database objects creating scripts.
You can send the sample using the contact form at our site: devart.com/company/contactform.html