Results 1 to 3 of 3

Thread: Compile errors with VS 2003 Project in VS 2005

  1. #1

    Thread Starter
    Member blackduck603's Avatar
    Join Date
    Jun 2008
    Posts
    35

    Compile errors with VS 2003 Project in VS 2005

    I am trying to convert a VB .NET project from Visual Studio 2003 to Visual Studio 2005.

    I have run into a compile error that I do not know how to resolve.

    I get the following compile error associated with the code shown below.
    Error 17 '_TableRowChangedEvent' is not a member of 'dsCurUser.TableDataTable_'.

    Code:
            Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
                MyBase.OnRowChanged(e)
                If (Not (Me._TableRowChangedEvent) Is Nothing) Then
                    RaiseEvent _TableRowChanged(Me, New _TableRowChangeEvent(CType(e.Row, _TableRow), e.Action))
                End If
            End Sub

    In VS 2003 AND in VS 2005.....the code module (dsCurUser.vb) is the only place where ._TableRowChangedEvent appears in the code. If I right-click, then select Go To Definition, it brings me to the line I am on (which as far as I can tell is the only reference in the entire project).

    The same code/project compiles with no errors in VS 2003.

    Does anyone have any insights, suggestions, etc?

    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Compile errors with VS 2003 Project in VS 2005

    Just remove the If statement. I haven't seen code like that ion VB before, only in C#. It's basically checking to see whether any event handlers have been registered before raising the event. Don't worry about that. Just go ahead and raise the event. Nothing will happen if there are no event handlers.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member blackduck603's Avatar
    Join Date
    Jun 2008
    Posts
    35

    Re: Just remove the If statement

    Thank you.


    Commenting the If/Endif statements fixed it.I did not really understand what they were trying to do there. Thanks for shedding some light on it. I inherited this code and there are absolutley no comments.


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