By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,841 Members | 840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,841 IT Pros & Developers. It's quick & easy.

System.Management - DNS/national characters

P: n/a

we have been using WMI from VB6 to automate configuration of new DNS
zones on our win2000 servers, and are now trying to move the system to
a application.

We recently added some zones with names containing national characters
(norwegian ), and then everything stopped working, including the
old VB6 app. The error occurs when I try to enumerate the zones - it
stops when it reaches the first zone (alphabetically) containing an
national character. It works fine if I only parse before the first
"bad" zone.

Is there any way to get this to work with national characters?

The error (caused by "next" in the for loop):
System.Management.ManagementException.ThrowWithExt endedInfo(ManagementStatus
at System.Management.ManagementObjectEnumerator.MoveN ext()
The code:

Dim s As New ConnectionOptions()
s.Username = "..."
s.Password = "..."

Dim ms As New ManagementScope("\\server\root\MicrosoftDNS", s)
Dim qry As New WqlObjectQuery("select * from
MicrosoftDNS_SOAType where DomainName = ''")
Dim searcher As New ManagementObjectSearcher(ms, qry)
Dim o As ManagementBaseObject
Dim p As PropertyData
For Each o In searcher.Get()

Best regards,
Eric Carr
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.