Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7539219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:19:30+00:00 2026-05-30T07:19:30+00:00

I have a VB6 program that is failing on a particular machine. The nature

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:19:31+00:00Added an answer on May 30, 2026 at 7:19 am

    Yes, many type conversion functions and implicit conversions are locale-aware. For reliable operation in a case like this (in particular with XML) use:

    If LCase$(Trim$(string-expression)) = "true" Then
    

    XML schemas are fairly “soft” creatures. You might want to look at:

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms762308(v=vs.85).aspx

    Basically MSXML 4.0 is obsolete and not meant to be used anymore. Even then you need an XDR schema to get stronger typing. As of MSXML 6.0 XDR is not supported.

    Effectively you ought to be using .nodeValue and just dealing with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a COM Callable Wrapper that I'm using from a VB6 program, but
we have a VB6 binary executable that comes with no source code. And we
I have a VB6 dll that is loaded by a VB6 frontend. This VB6
I have a VB6's Application that is in production environment right now, this application
Our VB6 program currently calls code in a C++ dll. This dll does not
We have a program written in VB6 that in the past connected to Oracle
I have a VB6 program that someone recently helped me convert to VB.NET In
I have a VB6 program that uses a n Access backend. The query that
I have a relatively simple select statement in a VB6 program that I have
I have a VB6 program that adds a column to an MS Access database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.