Page 1 of 1

LoadFromFile

Posted: Fri 14 Sep 2007 18:08
by PoSeiDoN31
Hello again. I have a little problem with the application I'm building using MyDAC Components.

The problem is: I have a TMyVirtualTable and I'm trying to storage the data of the VirtualTable locally, to be able to do that I'm using the SaveToFile method of the VirtualTable component. Then I'm trying to reload the data form the file, obviously using the LoadFromFile method. The problem is that when i load the data it doesn't assign the names of the fields to the VirtualTable and i get an error when i try to post records.

I verified this by watching the property VirtualTable.Fields[0].name and i noticed that before the LoadFromFile it has the name of the field, but after the LoadFromFile the name disappears.

Then when i try to do this
VirtualTableField.AsString := Value;
it throws an Access violation exception.


I'll appreciate your help.

Posted: Mon 17 Sep 2007 08:02
by Antaeus
Please specify what MyDAC and IDE versions do you use.
Also provide us with the Delphi code that reproduces this problem.