Hi,
I have a task, I need to generate a table from a variable query!!
Ok, I will make it clearer, I have 2 tables one of them called "Names", the other one called "Employee_Info".
The table "Names" contain one field only, which is "Field_Name", the records stored in that table is:
1. Employee_Age
2. Employee_Name
The other table, which is "Employee_Info" contains the fields "Employee_Name,Employee_Age,Employee_Sex".
Now what I am required to do is to search the first table "Names" and to show the fields of the second table "Emploee_Info" which is stored in the First table "Name".
In the above case, to show Employee_Age, Employee_Name of the "Employee_Info" table, those two fields only will be shown, because they are stored in table "Names".
I hope this is clear, can any one help:
I think this is the solutions, but I have a problem.
// forget about the connection and other codes, here is just the headlines.
SQL = "Select * from Names"
oRss1.open SQL,Connection
SQL = "Select * from Employee_Info"
oRss2.open SQL,Connection
Do While Not oRss2.Eof
Do While Not oRss1.Eof
Response.Write(oRss2.Fields(oRss1.Fields("Field_Name")) & "/")
Loop
Response.Write("<br>")
oRss2.MoveNext
Loop
The problem is in the line:
oRss2.Fields(oRss1.Fields("Field_Name"))
I think it shall be something different that oRss1.Fields(""), I think the .Fields shall be replaced with something different.
Can you help,
Thanks