An error occurred while updating the entries. See the InnerException for details.

Unanswered An error occurred while updating the entries. See the InnerException for details.

  • Tuesday, February 02, 2010 8:05 PM
     
      Has Code
    "An error occurred while updating the entries. See the InnerException for details."

    I get this error when ever i execute a saved changes.  i have the entire method wrapped in a try .. catch block but the error never enters it.  it stop right on the line as if the try catch were in place.
     Private Sub btnAddElement_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
    Cursor = Cursors.Wait

    Try

    Dim localBRF_LABOR_ELEMENTS As BRF_LABOR_ELEMENTS = lvAllElements.SelectedItem
    Dim localBRF_LABOR_WORKSTATION As BRF_LABOR_WORKSTATION = dgAllWorkStations.SelectedItem

    Dim localBRF_LABOR_WORKSTATION_ELEMENT As BRF_LABOR_WORKSTATION_ELEMENT = _
    BRF_LABOR_WORKSTATION_ELEMENT.CreateBRF_LABOR_WORKSTATION_ELEMENT(localBRF_LABOR_WORKSTATION.BRFLW_WORKSTATIONID _
    , 0, localBRF_LABOR_ELEMENTS.BRFLE_ELEMENTID)

    localBRF_LABOR_WORKSTATION_ELEMENT.BRF_LABOR_ELEMENTS = localBRF_LABOR_ELEMENTS
    localBRF_LABOR_WORKSTATION_ELEMENT.BRF_LABOR_WORKSTATION = localBRF_LABOR_WORKSTATION

    _dataContext.AddToBRF_LABOR_WORKSTATION_ELEMENT(localBRF_LABOR_WORKSTATION_ELEMENT)
    _dataContext.SaveChanges() 'THIS IS WHERE THE ERROR HAPPENS AND THE CODE BREAKS

    Cursor = Cursors.Arrow

    Catch ex As Exception
    MsgBox(ex.Message & vbCr & vbCr & ex.InnerException.ToString)
    End Try

    End Sub

    Christian - developer

All Replies

  • Friday, February 05, 2010 6:24 AM
     
     

    Hi,
    Could you please post the inner exception here? it will be helpful to find out what happened in your code.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Wednesday, September 28, 2011 11:54 PM
     
     
    Did you ever figure out an answer to this question, I'm having the same problem.