473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

NetServerEnum

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
Nov 21 '05 #1
3 2624
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/247referenc...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.)





Nov 21 '05 #2
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

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:%2*****************@TK2MSFTNGXA01.phx.gbl...
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/247referenc...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.)





Nov 21 '05 #3
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
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:%2*****************@TK2MSFTNGXA01.phx.gbl...
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/247referenc...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.)





Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dmitry | last post by:
Hi. I'm interesting how to enumerate available SQL servers in the network from code in C#. It may be done in C++ using WINAPI function NetServerEnum. If there is no way except importing this...
7
by: trint | last post by:
How can I add all the network printers to a combobox? Thanks, Trint
1
by: Dave Thorn | last post by:
Im trying to write an application which goes through selected servers on the network and (according to the file path provided) recurses through all folders and deletes log files that fit a...
5
by: Robin Tucker | last post by:
I need to marshal an IntPtr (which I've got from GlobalLock of an HGLOBAL) into a byte array. I know the size of the array required and I've got a pointer to the blob, but I can't see how to copy...
1
by: Terry Olsen | last post by:
I am trying to convert a program I wrote in VB6 that gathered all the names of servers on the network and put them in a list box. VB .NET does not allow a typecast of "Any". I am having big...
3
by: Steve | last post by:
Hi all How would i get a list of all Active Computers on a network? All I need are the computer names. Kind Regards, Steve.
3
by: JD | last post by:
I'm looking for a simple way to get a list of my server off of the network. Primarily I'm looking for my SQLServers. In VB6 I'd use SQLDMO, but I was looking for a pure .net solution. Anything?????
3
by: Joe User | last post by:
Hi - I found the class below on another website (www.devx.com) and can't seem to figure out how to make a call to this class to retrieve the machines and put them in a listbox. I am definitely a...
2
by: j-in-uk | last post by:
I am using NetServerEnum to get a list of sqlserver databases in my c# code. I notice it does not return sqlexpress databases. What can I use to get a list of all sqlservers? Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.