PDA

Click to See Complete Forum and Search --> : Random ASP Error


CiberTHuG
Jun 12th, 2001, 12:09 PM
Okay, this is the wrong way to ask a question, but it is upsetting me greatly.

This is the 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?

monte96
Jun 12th, 2001, 05:06 PM
Don't use set.

arrNodes = RS.GetRows()

is all you need. Use Set ONLY with objects. An array is not an object in VBScript.

CiberTHuG
Jun 13th, 2001, 08:13 AM
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!

:)