NetServerEnum

L

lgbjr

Hi All,

I'm not sure if this is the right or best place to post this question, but
as the problem is within a VB.NET app, I'll give it a go:

I am populating a combobox with a list of SQL servers on a network using
NetServerEnum. The Server Type is set to 4 (which is for SQL Servers). When
the user selects a server from the combobox, another combobox is populated
with the available databases on that server. I know there are three SQL
servers on the network, but only 2 are showing up in the list. But, if I
type the missing server name into the textbox portion of the combobox, the
list of DBs available on that server appears in the DB combobox. So, it's
not a connectivity issue.

All three SQL Servers are WINXP (SP2) with MSDE 2000.

Any ideas why one of them is not showing up?

TIA
Lee
 
S

Steven Cheng[MSFT]

Hi Lee,

Welcome to MSDN newsgroup.
As for the one server not display when using NetServerEnum to search all
the existing SQLServers in the network you mentioend, I'm thinking whether
it is a machine specific problem. Does the problem also occur if you try
the same code on some other machine in the network? Also, is there anything
obviously different on that missing server from the other two servers?

In addition, based on my research we can also use SQLDMO component to query
all the existing sqlservers. You can have a look at the SQLdmo code in the
following threads and test to see wheher it can retrieve the complete list
or get the same result with the NetServerEnum:

http://www.dotnet247.com/247reference/msgs/31/155355.aspx

If there're any other findings, please also feel free to post here. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
L

lgbjr

thanks for the reply Steven,

Interesting, I loaded the app onto the machine that wasn't showing up in the
list. Even running the app from that machine, the other two servers show up,
but it doesn't! So, I'm stuck. It's obviously not a conectivity issue, since
I can still connect to the DB from the other machines, and I can connect to
the other servers from the "Missing" machine.

I suspect that a quick uninstall/re-install of MSDE on that machine will fix
it, though there's probably an easier way to fix it. Where and how does the
OS actually make available it's ServerType? A registry entry?

TIA
Lee
 
L

lgbjr

Well, I found the problem, quite by accident or by luck. The ntwdblib.dll
was missing from the Windows/system32 dir. Copied it from another machine,
rebooted, now the machine shows up in the app!

thanks for pointing me to a machine specific problem!

cheers
Lee
 
S

Steven Cheng[MSFT]

Hi Lee,

Glad to hear that you've figured out the problem.

Cheers,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top