Update clause RRS feed

  • Question

  • In a previous question I had about saving data a piece of code was used, I believe by Karen, while she was assisting me in finding the issue:

            Dim affected As Integer = Me.LnkItemVendorTableAdapter.Update(Me._MasterBase3_0ItemMasterDataSet)
            If affected <> 1 Then
                _StrError = "frmItemRecord, tblSourceMasterDataGridView_CellDoubleClick() Event, Line XX"
                MessageBox.Show("Save Failed")
            End If

    What I have above has my own code within the If branch to suit my specific needs.

    So what I would like to know is how does the variable affected come out to be an integer value and how is the value 1 derived?

    I do not know why, but this seems important and I should understand what is going on.


    Saturday, September 16, 2017 2:27 AM


All replies