title: Passing a SQL result as an argument for a VBScript object
body: <p>I am working on an extant .Asp program at the moment which contains the following snippet:</p>
  
  <pre><code>Dim strRel_Report_Location
  Dim rs, sql, blnReportExists
  Dim strUID
  Dim intMonth, intYear
  
  sql = "Select NewID() AS UID"
  Set rs = DB.Execute(Sql)
  strUID = rs("UID")
  
  
  strRel_Report_Location = "/Admin/Reports/Temp/t" &amp; strUID &amp; ".html"
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>strRel_Report_Location = "/Admin/Reports/Temp/t" &amp; strUID &amp; ".html"
  </code></pre>
  
  <p>Any illumination would be greatly appreciated as I don't wish to just make assumptions on the code with which I am working. </p>
  
  <p>I'm sure this is a layup for you guys, but thank you for your help!</p>