Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++

Using FireDAC Unidirectional property for fast, low memory selection set processing

I often do large Oracle database queries using FireDAC to analyze registration data about our products and customers. Most of the time I am only processing through millions of rows to create a report or chart. One of the FDQuery properties that I forget to set True is the TDFQuery’s “Unidirectional” sub-property found under the FetchOptions (TFDFetchOptions) property.  By default Unidirectional is set to false as some developers will want to put the data into a grid or other container and update the values.

In my case, when I left Unidirectional false and read through millions of rows returned using my query, I was getting an “out of memory” error. Setting Unidirectional to true tell FireDAC not to cache the rows and my app never runs out of memory.

You can find more information about the Unidirectional property on the FireDAC docwiki and FAQ:

Have fun using FireDAC in your RAD Studio, Delphi and C++Builder 10 Seattle projects.

[DownloadButton Product=’RAD’ Caption=’Download the Free Trial of RAD Studio 10 Seattle’]

[BuyButton Product=’RAD’ Caption=’Purchase RAD Studio 10 Seattle – special offers are available until the end of 2015!’]


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES