DeferredPost

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
davidroura
Posts: 2
Joined: Fri 20 Nov 2009 14:55

DeferredPost

Post by davidroura » Fri 20 Nov 2009 16:06

Hi,

How do I set a TUniQuery state to a browse mode after a DeferredPost without posting the change to the DataBase again?

Thanks

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 23 Nov 2009 08:10

Call the Cancel method.

davidroura
Posts: 2
Joined: Fri 20 Nov 2009 14:55

Post by davidroura » Mon 23 Nov 2009 15:44

Hi,

If I call the Cancel method, it would unsynchronize the database with the TUniQuery because the changes that are posted to the database are canceled in the TUniQuery.

I need to keep the changes, do commit to the database and keep synchronize the TUniQuery with the DataBase. If I do Post to the TUniQuery, it does another Update to the Database; if I do Cancel, it cancels the changes to the TUniQuery and I need that the TUniQuery display the changes in the grid.

Thanks

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 24 Nov 2009 09:11

There is no way to prevent another query to the database. Why do you use DeferredPost? Maybe your code can be changed to use normal Post.

Post Reply