I'm having trouble getting my application to use the config file I've set up for it.
I can get the config file and it's being found correctly (I've checked the path) - but it fails on the oXmlDoc.Load command.
I've got references in for System.XML and MSXML2 just in case. Can anyone see where I might be going wrong?
I've inherited this code (which was originally written in VBscript) so I'm not entirely sure about the .async = "false" line either...
Cheers,
Dave
"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me
For all your testing needs: Forum1393
I can get the config file and it's being found correctly (I've checked the path) - but it fails on the oXmlDoc.Load command.
I've got references in for System.XML and MSXML2 just in case. Can anyone see where I might be going wrong?
Code:
oShell = CreateObject("Shell.Application")
oFolder = oShell.Namespace(DESKTOP)
sDesktop = oFolder.self.path
sConfigFile = """" & sDesktop & "\SCMS_Config.xml"""
oFolder = Nothing
oShell = Nothing
' Parse the config file
Dim oXmlDoc
oXmlDoc = CreateObject("Microsoft.XMLDOM")
oXmlDoc.async = "false"
If oXmlDoc.Load(sConfigFile) = False Then
' The document failed to load.
I've inherited this code (which was originally written in VBscript) so I'm not entirely sure about the .async = "false" line either...
Cheers,
Dave
"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me
For all your testing needs: Forum1393