Out Of Memory Error

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
aleigh24
Posts: 1
Joined: Wed 03 Dec 2014 00:10

Out Of Memory Error

Post by aleigh24 » Wed 03 Dec 2014 00:24

Hi,

I'm having a lot of trouble copying a TMyQuery dataset to a TVirtualTable and was wondering if I could have some help.

There are about 7000 rows in the dataset and 17 cols, mostly ints and short strings. So not a huge amount of data.

I get a "out of memory" error when I attempt to copy it using CRBatchMove. I've also tried copying the fields manually and get that same error. It seems the 'Append' method just chews up more and more memory.

Any help would be greatly appreciated.

Regards,

Andrew

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Out Of Memory Error

Post by ViktorV » Thu 04 Dec 2014 10:14

The TCRBatchMove component copies records between datasets. In your case, it means that on the computer where your application runs, you have two datasets: one that contains records (MySQL data) and another where you are going to copy these records to (VirtualTable). Due to that datasets store data in memory, at some point of copying data you encounter the 'Out of memory' error. To avoid this problem, you can set up the source dataset (MySQL) to read data by portions and release memory that is not needed. For this, you should set the TMyQuery.UniDirectional property to True.

Post Reply