Page 1 of 1

TxxxxFields get nil after assign

Posted: Mon 13 Dec 2004 15:13
by juanmaria
Hi,

I'm using Sdac 3.00.1.1 with Delphi 7 and keep finding a problem with VirtualTable fields after using assign.

For example, if I have a VirtualTable named vImp and a TFloatField named vImpAnte as follows:

vImp: TVirtualTable;
vImpANTE: TFloatField;

If I use this VT by itself it works fine, but if I want to populate it by doing an assign(AnotherSameStructureDataset) all the TxxxField under my VT become nil and I get an access violation when I try to access them.
However, I can still acces the newly populated fields using .fieldbyname or .fields[] but never with its associated TxxxFields

Posted: Mon 13 Dec 2004 16:41
by Paul
VirtualTable component does not control fields compatibility within Assign method, therefore it clears all fields of TVirtualTable object. You must recreate required fields manually.