RAD Studio 10.4.1 is now available! Learn more. Looking for discounts? Visit our Special Offers page!

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   Learn More About Upgrading

Related posts
CodeDelphiRAD Studio

Learn How To Send Arrays To A PostgreSQL Database Server Using FireDAC In Delphi On Windows

CodeDelphiRAD Studio

TFDBatchMove Is A Powerful Way To Move Data Between Text Files And Tables Using Datasets In Delphi

C++DelphiIDERAD Studio

Boost Productivity With Useful Bookmarks IDE Plugin To Bookmark And Navigate Code In Delphi And C++Builder

CodeDelphiRAD Studio

Learn How To Use FireDAC In The Dynamic-Link Libraries With DLL Sharing Sample In Delphi

Leave a Reply

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