Exception error

Results 1 to 2 of 2

Thread: Exception error

  1. #1
    Gayle Guest

    Default Exception error

    Any idea what the following message means?<BR>error &#039;80020009&#039; <BR>Exception occurred. <BR><BR>The error occurs on the following line of code:<BR>While Not rs.EOF and magName = trim(rs("name"))<BR>It&#039;s always generated on the last iteration of the loop.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Exception error

    VBScript does not short-circuit its boolean statements. So, when RS.EOF is True (meaning you are at the end of your recordset) the statement above still tries to check rs("Name"). So, do this:<BR><BR>While Not rs.EOF<BR> If magName = trim(rs("Name")) then<BR> &#039;do your stuff<BR> End If<BR><BR> rs.MoveNext<BR>Wend<BR><BR><BR>Happy Programming!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts