I'm using postgres data 2.0
The problem is really very very simple. 
At runtime I load 21,000 records into a table TVirtualTable, 
SaveToFile C: \ XXX, 
I close the program .. 
Start program .. load data with LoadFromFile .. and It raise an exception in 
VirtualTable at APPEND command Line 1521 
  for j := 0 to RecordCount - 1 do begin
                  Append;
                  try
                    for i := 0 to LocFieldDefs.Count - 1 do begin
                      Field := FieldArr;
Best Regard 
Carlo Narcisi
			
									
									
						TVirtualTable.LoadFromFile does not work
Hello,
Unfortunately, I can not can not reproduce the problem.
I have tested it on the following code:
Insert:
var
i: Integer;
begin
VirtualTable1.Open;
for i:=0 to 21000 do
begin
VirtualTable1.Append;
VirtualTable1['ID']:= i;
VirtualTable1['TEXT']:= 'Text_'+IntToStr(i);
VirtualTable1['DATE']:= date;
VirtualTable1.post;
end;
VirtualTable1.SaveToFile('e:\1.txt');
Load:
VirtualTable1.Open;
VirtualTable1.LoadFromFile('e:\64080.txt');
the fields were created manually.
Please try executing this code.
			
									
									
						Unfortunately, I can not can not reproduce the problem.
I have tested it on the following code:
Insert:
var
i: Integer;
begin
VirtualTable1.Open;
for i:=0 to 21000 do
begin
VirtualTable1.Append;
VirtualTable1['ID']:= i;
VirtualTable1['TEXT']:= 'Text_'+IntToStr(i);
VirtualTable1['DATE']:= date;
VirtualTable1.post;
end;
VirtualTable1.SaveToFile('e:\1.txt');
Load:
VirtualTable1.Open;
VirtualTable1.LoadFromFile('e:\64080.txt');
the fields were created manually.
Please try executing this code.