Uniquery ,dbgrid postgresql 9.1

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Uniquery ,dbgrid postgresql 9.1

Post by DemetrionQ » Mon 27 May 2013 12:54

Hello.

1) If TUniQuery.Options.LocalMasterDetail is set to True, the Detail Query loads all records on the "select * from salesdetail" query (i.e., 500000 in your case).

2) In order to decrease the number of records that will be loaded on opening TUniQuery, you should set the FetchAll property to False. This can be done via TUniQuery.SpecificOptions in the following way:

Code: Select all

  UniQuery1.SpecificOptions.Values['PostgreSQL.FetchAll'] := 'False';
At this, the number of records that will be loaded on opening TUniQuery will be limited by the value of the TUniQuery.FetchRows property. On further work data will be loaded on demand (e.g. on calling the TUniQuery.Next, TUniQuery.Last methods).

Note: setting the FetchAll property to False is useless for the detail query with the TUniQuery.Options.LocalMasterDetail property set to True, as record filtering (performed on LocalMasterDetail = True) will require loading of all records from the table at once.

Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

Re: Uniquery ,dbgrid postgresql 9.1

Post by Suhaimin » Mon 27 May 2013 15:49

Hello,

Thanks for your reply.. if TUniQuery.Options.LocalMasterDetail = false, is it still possible to save query detail data to cache memory (local client) ? if there is no, so entry data via Tuniquery is not effective. thanks a lot

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Uniquery ,dbgrid postgresql 9.1

Post by DemetrionQ » Wed 29 May 2013 12:13

Hello.

If you need changes added to a dataset not to be immediately sent to server, but to be saved to local cache, set the TUniQuery.CachedUpdates property to True. At this, data modifications will be sent to server only on calling the TUniQuery.ApplyUpdates method.

Note: if the TUniQuery.Options.LocalMasterDetail property in the detail query is set to False, then moving to another record in the master query will cancel cached modifications in the detail query. Such behaviour is standard for master-detail relationship.

The detailed information about the CachedUpdates property can be found in the UniDAC documentation.

Suhaimin
Posts: 79
Joined: Mon 06 May 2013 12:19

Re: Uniquery ,dbgrid postgresql 9.1

Post by Suhaimin » Thu 30 May 2013 11:12

Hello,
Thanks for your help...
can Tquery do the same Aggregates function in TClientdataset ? everytime tquery detail post i want automatic calculate value detail in tquery master , is it possible with TQuery master but not manually calculate ? thanks

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Uniquery ,dbgrid postgresql 9.1

Post by DemetrionQ » Mon 03 Jun 2013 15:34

Hello.

TUniQuery doesn't support aggregate fields.

Post Reply