title: Microsoft VBScript runtime error '800a0009'
body: <p>I recently inherited a website in ASP, which I am not familiar with. Yesterday, one of the pages began to throw an error:</p>
  
  <pre><code>Microsoft VBScript runtime error '800a0009'
  
  Subscript out of range: 'i'
  
  default.asp, line 19
  </code></pre>
  
  <p>Here is the code from lines 13-27:</p>
  
  <pre><code>&lt;%
  set rs = Server.CreateObject("ADODB.Recordset")
  rs.open "SELECT * FROM VENDORS_LIST_TBL WHERE inStr('"&amp; dVendorStr &amp;"','|'&amp;ID&amp;'|')", Cn
  
  DIM dTitle(100), dDescription(100), dLink(100)
  i = 0 : Do while NOT rs.EOF : i = i + 1
  dTitle(i) = rs.fields.item("dTitle").value
  dDescription(i) = rs.fields.item("dDescription").value
  dLink(i) = rs.fields.item("dLink").value : if dLink(i) &lt;&gt; "" then dTitle(i) = "&lt;a href=""" &amp; dLink(i) &amp; """&gt;" &amp; dTitle(i) &amp; "&lt;/a&gt;"
  if NOT rs.EOF then rs.movenext
  Loop
  x = i
  
  rs.Close : Set rs = Nothing
  %&gt;
  </code></pre>
  
  <p>Any ideas on what's going on here and how I can fix it?</p>
  
  <p>Thank you!</p>