out of memory when posting to Tvirtualtable

out of memory when posting to Tvirtualtable

Postby jeantawk » Mon 10 Sep 2007 07:47

I have a Delphi application for processing reports from an Oracle database.
After I get well into the report (about 2000 rows), I run out of memory. The application works like this:

if VDataSetRows.Count > 0 then
for i := 2 to VDataSetRows.Count - 1 do
AVirtualTable.Append ;
VDataSetRow := TDataSetRow(VDataSetRows.Items[i] ) ;
for j := 0 to VDataSetRow.DataSetFields.Count - 1 do
VDataSetField := TDataSetField( VDataSetRow.DataSetFields.Items[j] ) ;

VFindField := AVirtualTable.FieldByName( VDataSetField.FieldName ) ;
if VFindField <> NIL then
if VFindField.DataType = ftFloat then
VFindField.AsFloat :=
else if VFindField.DataType = ftInteger then
VFindField.AsInteger :=
else if VFindField.DataType = ftBoolean then
VFindField.AsBoolean :=
VFindField.AsString :=
end ;
end ;
AVirtualTable.Post ;
end ;
if VDataSetRows.Count > 2 then
AVirtualTable.First ;
end ;

I have 1 gigabyte of ram on my desktop machine, so I should not be running out of memory.
Does anybody know what I should be doing, what I should be closing, or where I should be freeing something to conserve this memory?
By the way , i used the TClientDataSet instead of TVirtualTable for a test and everything went OK.
Any ideas ?
Posts: 4
Joined: Tue 19 Jun 2007 07:13
Location: lebanon

Postby Antaeus » Tue 11 Sep 2007 11:19

It is pretty hard to determine what is the reason of the problem having only this piece of code. Try to make a small sample to reproduce this problem. Send me this sample at evgeniyd*crlab*com.
Also supply me the following information:
- exact version of TVirtualTable.
- exact version of your IDE.
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Return to VirtualDAC