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
Hi,

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 vb.net 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
at
System.Management.ManagementException.ThrowWithExt endedInfo(ManagementStatus
errorCode)
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 = 'example.no'")
Dim searcher As New ManagementObjectSearcher(ms, qry)
Dim o As ManagementBaseObject
Dim p As PropertyData
For Each o In searcher.Get()
ListBox1.Items.Add(o.ToString)
Next

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.