-
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?
-
Don't use set.
arrNodes = RS.GetRows()
is all you need. Use Set ONLY with objects. An array is not an object in VBScript.
-
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!
:)