My question is, how is it possible to pass the string "UID" as an argument to the object 'rs'? One may easily divine from the code that the intent is to pass the resulting "NewID()" call to the path which is assigned in the statement:

strRel_Report_Location = "/Admin/Reports/Temp/t" & strUID & ".html"

Any illumination would be greatly appreciated as I don't wish to just make assumptions on the code with which I am working.

I have to make an assumption here because you never show how the DB variable is created. I am going to assume you are working with straight ADO because the call signatures in your code match that.

Again, you are probably working with an Ado Command instance which has the method Execute. This method takes a sql string, executes it on the database server, and then returns a Recordset which contains the results of the query that executed. The recordset has an indexer with the name of the columns, using that indexer you can get the value in the column.

If you want to learn more about this code it would help to start reading up on how to work with ADO.

Email codedump link for Passing a SQL result as an argument for a VBScript object