TxxxxFields get nil after assign

TxxxxFields get nil after assign

Postby juanmaria » Mon 13 Dec 2004 15:13

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
juanmaria
 
Posts: 14
Joined: Thu 11 Nov 2004 08:37

Postby Paul » Mon 13 Dec 2004 16:41

VirtualTable component does not control fields compatibility within Assign method, therefore it clears all fields of TVirtualTable object. You must recreate required fields manually.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to VirtualDAC