BC30456 'UnscheduledReviewDelete' is not a member of 'Reviews' RRS feed

  • Question

  • User567223955 posted

    I have inherited a legacy VB.net application, where my skill with VB is really rusty.  I used the application's structure to create a stored procedure, that is invoked from a data layer subroutine, which is invoked from a business layer routine, which in turn is called from a .aspx VB code behind method. it is all rather simple and straight forward, however I continue to get the error BC30456 'UnscheduledReviewDelete' is not a member of 'Reviews', in the code behind.  I've checked by invoking the business layer Reviews.vb metadata which shows all the subroutines and functions except for the one that I created, saved, and even checked-in.  Opening the Reviews.vb in VS 2015, has all the same modules including the 'UnscheduledReviewDelete' subroutine.  What action am I missing that is excluding the subroutine from being recognized?  Below are the three modules in the application solution:

    ASPX.VB code:
    Protected Sub ASPxGridViewUnscheduledReviews_RowDeleting(ByVal sender As Object, ByVal e As DevExpress.Web.Data.ASPxDataDeletingEventArgs) Handles ASPxGridViewUnscheduledReviews.RowDeleting

                  e.Cancel = True

                  Dim aspxGridView As ASPxGridView = sender


                  Dim StatusID As Integer = CType(e.Keys("AcrStatusID"), Integer)

                  'delete row from ACRStatus table where AcrStatusID = StatusID


                         lblMessage.Text = String.Empty

                         Dim bl As New CYCIS_BL.Reviews

                         bl.UnscheduledReviewDelete(StatusID) <--- UnscheduledReviewDelete is not a member of ‘Reviews’




                  Catch ex As Exception

                         lblMessage.Text = ex.Message

                  End Try


           End Sub


    Business Layer Reviews.vb:

    Public Sub UnscheduledReviewDelete(ByVal StatusID As Integer)

                  Dim dl As New CYCIS_DL.Reviews


           End Sub


    Data Layer Reviews.vb:

    Public Sub UnscheduledReviewDelete(ByVal StatusID As Integer)

                  Using dbManager As New DBManager(DataProviderEnums.SqlServer, SQLConnectionHelper.CONN_STRING)


                               With dbManager



                                      .AddParameters(0, "@StatusID", StatusID)

                                      .ExecuteNonQuery(CommandType.StoredProcedure, "UnscheduledReviewDelete")

                               End With

                         Catch ex As Exception


                         End Try

                  End Using

           End Sub

    Wednesday, October 19, 2016 8:31 PM

All replies

  • User-707554951 posted

    Hi ronaldkunce,

    Your code have no problem.

    From your error message, it indicate that Reviews  didn’t contains a method called UnscheduledReviewDelete,

    1.Firstly, you need to check whether there have a method called UnscheduledReviewDelete exit in Reviews.

    2.You also need to make sure private keyword didn’t used on your method:

    The private keyword is a member access modifier. Private access is the least permissive access level. Private members are accessible only within the body of the class or the struct in which they are declared, as in this example:

    3.I think the most possible reason is that you reference is not correct.

    4. You didn’t  save you changes and rebuilt timely:

    For example, If we create a class with no any method, we use the class in one project correctly. Next, we add a method to the class, after that , you didn’t  save  and rebuilt the class, Then you use the method in  project directly, you will get an error warning: you class have no method called”your method name”

    So, I suggest you need to check the three point above.

    Best regards

    Thursday, October 20, 2016 9:42 AM
  • User567223955 posted

    I had performed everything you mentioned prior to submitting the above issue.  The code behind references the correct module in the CYCIS_BL.Reviews.vb class library.  The name of the class file name is spelled exactly the same in the code behind as it is in the class itself, as is the subroutine name.  The code I included specifically shows the class subroutine is set to Public, not Private, and is also been set as Shared.  The class library was saved, built, and rebuilt many times as well as the overall solution.  The solution rebuild continues to show the BC30456 error on the named "UnscheduledReviewDelete" subroutine/method name!

    Since all other methods in the  CYCIS_BL.Reviews.vb remain referenceable, I am not understanding why this newly added reference will not be added to the metadata of the CYCIS_BL.Reviews.vb library after build unless there is some sort of conflict that did not exist in prior builds but  now exists in the latest version of VS, VB, or the Network framework.  The one potential conflict I can see is that both the CYCIS_BL business layer library and the CYCIS_DL data layer library both have .vb class file with the same name (Reviews.vb).  If this was allowed in the past but is now a conflict, I may have to rename the data layer file and change all references to it to show the new name.  Since there are quite a few references to the CYCIS_DL.Reviews.vb file, I have avoided doing so, unless you confirm that this may be the issue. 

    Thursday, October 20, 2016 5:34 PM