ajtsoukalas
asked on
Generic access to different queries to the same table
I have an mySQL database which can have up to 6 queries on a given table.
I would like to access them with a generic procedure without an if then else construct as the processing on the queries will be the same for all 6. I need to be
able to reference the queries individually and display them simultaneously. Right now I have
procedure ProcessQuery(CodeType)
if CodeType = "AAA" then
begin
queryAAA.
queryAAA.
queryAAA.
end
else
if CodeType = "BBB" then
begin
queryBBB.
queryBBB.
queryBBB.
end;
what I would like to do is something like
procedure ProcessQuery(CodeType)
begin
queryCodeType.
queryCodeType.
queryCodeType.
end;
Can I do it and How Would I do it if I can?
AJ
I would like to access them with a generic procedure without an if then else construct as the processing on the queries will be the same for all 6. I need to be
able to reference the queries individually and display them simultaneously. Right now I have
procedure ProcessQuery(CodeType)
if CodeType = "AAA" then
begin
queryAAA.
queryAAA.
queryAAA.
end
else
if CodeType = "BBB" then
begin
queryBBB.
queryBBB.
queryBBB.
end;
what I would like to do is something like
procedure ProcessQuery(CodeType)
begin
queryCodeType.
queryCodeType.
queryCodeType.
end;
Can I do it and How Would I do it if I can?
AJ
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I like both answers
I am going to split the points
I am going to split the points
TQuery(FindComponent('quer
?
Regards