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

Posted on 2007-07-20
Last Modified: 2008-01-09
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
Question by:GabicusC
    LVL 96

    Accepted Solution

    Quit using ADO classic, and move to ADO.NET, or add <CLSCompliant(False)> _ attribute.


    Author Comment


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


    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now