LoadFromFile

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
PoSeiDoN31
Posts: 6
Joined: Wed 12 Sep 2007 15:35

LoadFromFile

Post by PoSeiDoN31 » Fri 14 Sep 2007 18:08

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.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 17 Sep 2007 08:02

Please specify what MyDAC and IDE versions do you use.
Also provide us with the Delphi code that reproduces this problem.

Post Reply