Results 1 to 2 of 2

Thread: Invalid Use of NULLS?!!?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Unhappy Invalid Use of NULLS?!!?

    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

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    fixed it DID this

    Dim strnull As String
    Set rs = ado.RunSPReturnRS("usp_adm_GetCategories", strnull, strnull)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width