![]() | |
ConneXionUpdateCustomer 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 oCustomer As New ConneXion.Customer Dim oResult As ConneXion.ConneXionResult oCustomer.TAMUserName = "EXEC" oCustomer.TAMPassword = "PSWD" oCustomer.CustomerID = "ABBOJO1" oResult = oConneXion.FindCustomer(oCustomer) If oResult.Success = False Then MessageBox.Show("FindCustomer was false. " & oResult.Description & ".") Else oCustomer.TAMUserName = "EXEC" oCustomer.TAMPassword = "PSWD" oCustomer.CSR = "KY" oResult = oConneXion.UpdateCustomer(oCustomer) If oResult.Success = True Then MessageBox.Show("Update customer is Successful") Else txtResult.Text = "Number: " & oResult.Number & vbCrLf & "Desc: " & oResult.Description & vbCrLf & "TAMErrorNumber: " & oResult.TAMErrorNumber & vbCrLf & "TAMErroDesc: " & oResult.TAMDescription End If End If