Skip to Content
0
Former Member
Jun 29, 2009 at 09:36 AM

ArgumentNullException

68 Views

Hi

Here i got an error message that "System.ArgumentNullException Value Cannot be null"

But here it is taking the filename in the predefined path...

Dim xmldoc As Xml.XmlDocument
            xmldoc = New Xml.XmlDocument
            Dim xmlListTables, xmlListFields As XmlNodeList
            Dim xmlNodeTable, xmlNodeField As XmlNode

            xmldoc = GetEmbeddedXML("QualityControlTableSetup." & FileName)

-


Private Function GetEmbeddedXML(ByVal strIdentifier As String) As System.Xml.XmlDocument
        Dim xmlDoc As New System.Xml.XmlDocument
        Try
            xmlDoc = New System.Xml.XmlDocument
            With New System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(strIdentifier))
                xmlDoc.Load(.BaseStream)
                .Close()
                Return xmlDoc
            End With
        Catch ex As Exception
            
            MsgBox("[GetEmbeddedXML]: " & ex.ToString)
        End Try
    End Function

-Manmath Das