How come my code gives me that error?
Code:
'Usage
Set rs = ado.RunSPReturnRS("usp_adm_GetCategories", Null, Null)
Code:
'Function
Function RunSPReturnRS(ByVal strSP As String, params, ByRef OutArray As String)

        ' Create the ADO objects
        Dim rs As ADODB.Recordset, cmd As ADODB.Command, OutPutParms As String
        Set rs = New ADODB.Recordset
        Set cmd = New ADODB.Command
        ' Init the ADO objects  & the stored proc parameters
        cmd.ActiveConnection = GetConnectionString()
        cmd.CommandText = strSP
        cmd.CommandType = adCmdStoredProc
        
        collectParams cmd, params, OutPutParms
        
        ' Execute the query for readonly
        rs.CursorLocation = adUseClient
        rs.Open cmd, , adOpenStatic, adLockReadOnly
        If OutPutParms Then OutArray = collectOutputParms(cmd, params)
        ' Disconnect the recordset and clean up
        ' Disconnect the recordset
        Set cmd.ActiveConnection = Nothing
        Set cmd = Nothing
        Set rs.ActiveConnection = Nothing

        ' Return the resultant recordset
        Set RunSPReturnRS = rs
End Function