Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 830
  • Last Modified:

Return type of function 'rsEmailList' is not CLS-compliant warning.

I am getting a Warning for rsEmailList in the first line of the following funciton that says "Return type of function 'rsEmailList' is  not CLS-compliant".  What do I need to do to this function to make it compliant?


    Public Function rsEmailList() As ADODB.Recordset
        'Create a Recordset to set to the Function recordset
        Dim rs As New ADODB.Recordset
        ' set Function RecordSet to rs Recordset
        rsEmailList = rs
        Dim cmdEmailList As New ADODB.Command
        cmdEmailList.CommandText = "selLAStageTixAddress"
        cmdEmailList.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc
        cmdEmailList.ActiveConnection = objConn
        rsEmailList.CursorLocation = ADODB.CursorLocationEnum.adUseClient
        rsEmailList.LockType = ADODB.LockTypeEnum.adLockReadOnly
        rsEmailList = cmdEmailList.Execute

    End Function
Richard Comito
Richard Comito
1 Solution
Bob LearnedCommented:
Quit using ADO classic, and move to ADO.NET, or add <CLSCompliant(False)> _ attribute.

Richard ComitoDirector of ITAuthor Commented:

As always Thanks.  This was a project I just imported into 2005.


Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now