![]() | |
ConneXionUpdateAttachment Method |
Namespace: ConneXion
![]() |
---|
Note: When doing an update, it is best to do a find first. This will populate the object with all the existing data before the update is made. If a find is not executed first, the object will be empty except for the data elements set in the update code |
Dim oConneXion As New ConneXion.ConneXion Dim oAttachment As New ConneXion.Attachment Dim oResult As ConneXion.ConneXionResult oAttachment.TAMUserName = "EXEC" oAttachment.TAMPassword = "PSWD" oAttachment.RecordNumber = "167" oResult = oConneXion.FindAttachment(oAttachment) If oResult.Success Then oAttachment = oAttachment oAttachment.TAMUserName = "EXEC" oAttachment.TAMPassword = "PSWD" oAttachment.Description = "Update to the attachment" oResult = oConneXion.UpdateAttachment(oAttachment) If oResult.Success Then MessageBox.Show("Update Attachment is successful") txtResult.Text = oResult.Description Else txtResult.Text = "Update Attachment is false" & vbCrLf & "Number: " & oResult.Number & vbCrLf & "Desc: " & oResult.Description & vbCrLf & "TAMErrorNumber: " & oResult.TAMErrorNumber & vbCrLf & "TAMErroDesc: " & oResult.TAMDescription End If Else MessageBox.Show("FindAttachment is false. ") End If