Click here to Skip to main content
11,921,316 members (60,712 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB LINQ VB.NET
I am currently trying to understand as to why when I apply the following changes to the interface object that it does not get added to the changeset.

The following is a transaction which is looping through XML and setting the values to the object(Which is some kind of item-type)
' If Connection is Closed
' Open before we get a Transaction
If DB.Connection.State = ConnectionState.Closed Then
End If
DB.Transaction = DB.Connection.BeginTransaction
    Dim nEl = 0
    For Each el As XElement In XDoc.Root.Elements
        Dim Type = el.Element("Type").Value.ToUpper
        Dim RefCode = el.Element("RefCode").Value.ToUpper
        Dim oIItem = GetItemByTypeAndCode(DB, Type, RefCode)
        If oIItem IsNot Nothing Then
            If Not el.Element("SP1").Value.IsNullOrEmpty Then
                oIItem.ItmSelling1 = CDbl(el.Element("SP1").Value)
            End If
            If Not el.Element("SP2").Value.IsNullOrEmpty Then
                oIItem.ItmSelling2 = CDbl(el.Element("SP2").Value)
            End If
            If Not el.Element("SP3").Value.IsNullOrEmpty Then
                oIItem.ItmSelling3 = CDbl(el.Element("SP3").Value)
            End If
            If Not el.Element("SP4").Value.IsNullOrEmpty Then
                oIItem.ItmSelling4 = CDbl(el.Element("SP4").Value)
            End If
            If Not el.Element("SP5").Value.IsNullOrEmpty Then
                oIItem.ItmSelling5 = CDbl(el.Element("SP5").Value)
            End If
            If Not el.Element("SP6").Value.IsNullOrEmpty Then
                oIItem.ItmSelling6 = CDbl(el.Element("SP6").Value)
            End If
            nEl += 1
            If ReportProgressDel IsNot Nothing Then
                ReportProgressDel.Invoke(nEl / XDoc.Root.Elements.Count * 100)
            End If
            Throw New Exception("Item '{0}' of type {1} not found!", RefCode.Trim, Type.Trim)
        End If
Catch ex As Exception
    lError = True
    Throw ex
End Try
Posted 25-Feb-13 22:25pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 583
1 Dave Kreskowiak 245
2 phil.o 160
3 KrunalRohit 134
4 F-ES Sitecore 130
0 OriginalGriff 6,951
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,171
3 George Jonsson 2,840
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web02 | 2.8.151120.1 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100