Results 1 to 3 of 3

Thread: Random ASP Error

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140

    Random ASP Error

    Okay, this is the wrong way to ask a question, but it is upsetting me greatly.

    This is the code

    Code:
      Private Function RTAverage (ByVal strMonitor, ByVAl date, ByVal MonitorDB)
        dim SQL, RS
        dim arrNodes
    
        SQL = "SELECT Node " & _
              "FROM MonitorNode " & _
              "WHERE Monitor = '" & strMonitor & "'"
        Set RS = MonitorDB.Execute(SQL)
    
        if RS.EOF then
          RTAverage = ""
        else
          set arrNodes = RS.GetRows()
          dim currNode
          for currNode = 0 to UBound(arrNodes, 1)
            RTAverage = RTAverage + RTAverage(strMonitor, arrNodes(currNode), date, MonitorDB)
          next 'Node
        end if
    
      End Function
    I am getting a "Object required" error on line 72 of the file, which is the set arrNodes = RS.GetRows() line.

    What object is required? Any debug ideas to help me figure out why this code isn't working?
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Don't use set.

    arrNodes = RS.GetRows()

    is all you need. Use Set ONLY with objects. An array is not an object in VBScript.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Thanks, Monte. Its a block of code I've used over and over again and I could not figure out why it was not working this time. For some reason, I put in a set this time.

    STUPIDTRAVISSTUPIDTRAVISSTUPIDTRAVIS!

    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

Posting Permissions

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



Click Here to Expand Forum to Full Width