Sorry if the title is a bit vague. I couldn't think how else to say it!
I have a script which retrieves data into 3 different recordsets. They are called rs1, rs2 and rs3.
I have quite a large piece of code later on in the script so I have created a function to save save space etc.
Within the function I wish to use the information from the recordsets opened earlier. I have tried passing the name of the recordset to the function as follows:
Function displayData(recordsetName)
response.write(recordsetName.Source)
End Function
displayData("rs1")
However this is trying to show the results from a recordset called recordsetName and as that doesen't exist it is throwing up an error.
Somebody told me to use 'ByRef' however this throws up an error saying the the recordset does not exist.
How can I use a recorset name passed to a function as a parameter?
Thanks