Page 1 of 1

Out Of Memory Error

Posted: Wed 03 Dec 2014 00:24
by aleigh24
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

Re: Out Of Memory Error

Posted: Thu 04 Dec 2014 10:14
by ViktorV
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.