AnsweredAssumed Answered

Batch update

Question asked by Pichaiyan Prabaharan on Sep 8, 2020
Latest reply on Oct 20, 2020 by Pichaiyan Prabaharan

Hi All,

 

I'm Trying to do batch update. But its not working. Anyone please help me to check whats wrong with my code?

I didn't get any errors. Simply its not updating.

 

  'Setting up Variables

                        Dim oVault As IEdmVault8 = New EdmVault5
                        If Not oVault Is Nothing And Not String.IsNullOrEmpty(AffectedFile.mbsStrData2) Then
                            oVault.LoginAuto(strVaultName, 0)
                            Dim oFile As IEdmFile8 = oVault.GetFileFromPath(AffectedFile.mbsStrData2)

                            If Not oFile Is Nothing Then

                                Try

                                    Dim oBatchUpdate As IEdmBatchUpdate2 = oVault.CreateUtility(EdmUtility.EdmUtil_BatchUpdate)
                                    Dim oVariableManager As IEdmVariableMgr5 = oVault
                                    Dim oVariable As IEdmVariable5 = oVariableManager.GetVariable("Part_Name")
                                    oBatchUpdate.SetVar(AffectedFile.mlObjectID1, oVariable.ID, "Test Value", EdmBatchFlags.EdmBatch_Nothing)
                                    MessageBox.Show("Updated")

                                    Dim Errors() As EdmBatchError2 = Nothing
                                    Dim errorSize As Integer = oBatchUpdate.CommitUpdate(Errors, Nothing)

                                Catch ex As Exception

                                End Try

                            End If
                        End If

 

Thanks

Outcomes