Refresh only one record afret insert

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Wed 10 Apr 2019 10:26

Refresh only one record afret insert

Post by greg1982 » Wed 10 Apr 2019 10:36

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);
   qryMain.ReadOnly:= false;
    qryMain.FieldByName('wa_remont_bills_aid').AsInteger:= DO_InternalID(RefreshId);
    qryMain.ReadOnly:= true;
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, []);  
But the record disappears and appears with full Refresh

Devart Team
Posts: 368
Joined: Tue 03 Oct 2017 11:00

Re: Refresh only one record afret insert

Post by Stellar » Mon 15 Apr 2019 13:34

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:

Post Reply