I have a TList set in one of my forms (namely lcvQueryList) which I use to add TQuery components to as required (using 'lcvQueryList.Add(DataModule1.Query1)').
I am able to use items in this list to set the datasource against DBChart Series (using 'DBChart1.Series.DataSource := lcvQueryList.Items[tpI]).
However I remain unable to use the queries in this list, i.e. cycling through the list and setting each to not active. I am trying to use the syntax :
for tpI := 0 to (lcvQueryList.Count - 1) do
begin
(lcvQueryList.Items[tpI] AS TQuery).Active := False;
end;
When I attempt to compile this code I am getting the error : 'Operator not applicable for this operand type.'.
Can anyone give me a pointer as to how I might cycle through my list of TQuery components and process each in the same way (i.e. setting Active := False, or SQL.Clear).
Thanks in advance.
Steve
I am able to use items in this list to set the datasource against DBChart Series (using 'DBChart1.Series.DataSource := lcvQueryList.Items[tpI]).
However I remain unable to use the queries in this list, i.e. cycling through the list and setting each to not active. I am trying to use the syntax :
for tpI := 0 to (lcvQueryList.Count - 1) do
begin
(lcvQueryList.Items[tpI] AS TQuery).Active := False;
end;
When I attempt to compile this code I am getting the error : 'Operator not applicable for this operand type.'.
Can anyone give me a pointer as to how I might cycle through my list of TQuery components and process each in the same way (i.e. setting Active := False, or SQL.Clear).
Thanks in advance.
Steve