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

    Question

  • "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
    Tuesday, February 02, 2010 8:05 PM

All replies