Hi,
I have been all over the web looking for a definitive answer to this
question. I want to have a function which grabs a record set, and
returns it. Then, after my function call, I want to use something like
EOF or GetRows() to cycle through the record set. But no matter what I
try, I get the following error:
Object doesn't support this property or method: 'currentRow.EOF'
-----------------
Code returning set from function:
<snip>
rs.Open cmd, , adOpenStatic, adLockReadOnly
Set cmd.ActiveConnection = Nothing
Set cmd = Nothing
set rs.ActiveConnection = Nothing
oConn.Close
Set oConn = Nothing
getReportLogRow = rs ' This is the return statement
End Function
----------
Code using the returned recordset:
<snip>
Set currentRow = CreateObject("ADODB.Recordset")
Set currentRow = getReportLogRow(sessID)
if(currentRow.EOF)then
<snip>
---------------------
If I can solve this... I'm gonna publish the solution all over the
place because I can't be the only one ripping out their hair over this.
Why does vbscript-asp make using functions such a pain? ;)
Thanks for any help!