I have a VB6 program that is failing on a particular machine.
The nature of the problem is code like this:
'this next line throws Type mismatch exception
If xml_file.documentElement.selectSingleNode("Node").Attributes.getNamedItem("InUse").nodeTypedValue Then
'do some stuff
End If
The program uses MSXML4, and this problem only occurs on one machine (so far), though it works on many other machines. Furthermore, the InUse attribute is defined in the XML schema as follows:
<xs:attribute name="InUse">
<xs:simpleType>
<xs:restriction base="xs:boolean">
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
One more thing.
If I print out TypeName() of that .nodeTypedValue expression, it comes back as a "String". It's not terribly surprising, then, that a type mismatch might occur. But why only on that one machine?
As I'm thinking about it, that machine may have the Locale set to a different language than the other machines that I'm testing. Could that have something to do with it? Does VB6 use the locale determine how to coerce the string "false" into a boolean? If so, is there any way to force it to use English?
Any ideas?