I have the below script, it shows and error on part2 and if I swich part1 and part2 it will show and error for the second time I use the oRst.eof ?
Set mConnection = CreateObject("applicationAPI.app")
mConnection.Connect(CPServer, CPDatabase, CPUser, CPPassword)
Set mRequest = CreateObject("applicationAPI.Request")
Set mRequest.CPConnection = mConnection
' -------- part 1
Set oRst = mRequest.GetRequestInitiators("Nadim Hussein")
If not oRst.eof Then ' I would get the error here when I make this part 2
initiatorID = oRst(2)
Set oRst = Nothing
'--------- part 2
Set oRst = mRequest.GetRequestCompanies("", "")
If not isempty(oRst) Then
While not oRst.eof ' I am getting the error here , however if I put this code above part 1 I will not get any error!
"I realize it's an error, but no one is going to try to do that!"
From "Top 10 Stupid Comments from Developers".