lucat
asked on
Accessing a nested field...
Hello,
i'm using TClientDataSet to read the data from a XML file.
I have a nested field and i need to access to its "subfields"... how can i do that through code?
I tried to read the help, it says something about using the TDatasetField class but i can't figure out how.
Let's say that i have something like this:
procedure Test;
var
CDS: TClientDataSet;
begin
CDS := TClientDataSet.Create(Self );
CDS.LoadFromFile('myfile.x ml');
CDS.Active := True;
if CDS.RecordCount > 0 then
begin
CDS.First;
//here i should read the subfields
//of a nested field (let's call it
//'mynestedfield')... how can i do this?
end;
CDS.Active := False;
CDS.Free;
end;
Any suggestion is welcome.
Bye,
Luca T.
i'm using TClientDataSet to read the data from a XML file.
I have a nested field and i need to access to its "subfields"... how can i do that through code?
I tried to read the help, it says something about using the TDatasetField class but i can't figure out how.
Let's say that i have something like this:
procedure Test;
var
CDS: TClientDataSet;
begin
CDS := TClientDataSet.Create(Self
CDS.LoadFromFile('myfile.x
CDS.Active := True;
if CDS.RecordCount > 0 then
begin
CDS.First;
//here i should read the subfields
//of a nested field (let's call it
//'mynestedfield')... how can i do this?
end;
CDS.Active := False;
CDS.Free;
end;
Any suggestion is welcome.
Bye,
Luca T.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
HI, lucat,
Sure I can show you an example of what I said,
but first tell me what item of my proposal you can not realize?
I seemed to give you accurate plan what to do.
Sincerely,
Nestorua.
Sure I can show you an example of what I said,
but first tell me what item of my proposal you can not realize?
I seemed to give you accurate plan what to do.
Sincerely,
Nestorua.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept answer from nestorua
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Paul (pnh73)
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Accept answer from nestorua
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Paul (pnh73)
EE Cleanup Volunteer
ASKER
Anyway... can you show me an example?
Shouldn't be that field a persistent field to use it that way? How do i make a field become a persistent field through code to do it?
Thank you,
Luca