Archives for category: .NET Development

I needed to modify a VB.NET 2.0 windows forms application to import data from an 2+GB XML file that is provided by a 3rd party.  The XML file contains multiple high level nodes, however I’m only concerned with nodes that match my “PARENTNODENAME”.  This file contains tens of thousands of “PARENTNODENAME” nodes that I need to parse and the perform various database actions with that data.

The VB.NET Code:

Dim bFirstRead As Boolean = True
Using r As XmlReader = XmlReader.Create(XMLFILENAME)
   While r.Read()
      If (bFirstRead) Then ' Only ReadToDescendant to get down to the "PARENTNODENAME" nodes initially
         bFirstRead = False
      End If

      If r.Name = "PARENTNODENAME" Then
         ' Parse nodes and import into database
      End If
   End While
End Using

I recently inherited a project where the developer was using CLR stored procedures.  You must execute the following SQL Script to be able to use those stored procedures.

sp_configure 'clr enable', 1