Repost: Listing SQL Servers on the network using CF

G

Guest

Hi!
Our application needs to make some configuration settings when the
application is run the first time. We want to display a form with a combobox
that has a list of sql servers on the network(the device will be connected to
the desktop). How can I get the names of the running sqlservers?
I was referring to this example:
http://www.codeproject.com/cs/database/LocatingSql.asp
but with no success yet. I do not want to use SQL DMO as it seems to have
some issues recognizing the MSDE servers.

Is this feasible?Any help or suggestions would be great.

Thank you for the time.
Regards,
Kumar
 
W

William Ryan eMVP

I implemented a solution like this by using essentially the same code he
lists there via a web service, and just returned an arraylist (although you
can certianly use other objects). Once you get the object back you can just
walk through it and load your combobox from there. Since the list probably
won't entail much data it's pretty quick and the implementation is a piece
of cake. I had tried getting this same code to work previously and didn't
have much luck either - doing it w/ a WS took all of about 20 minutes from
start to finish though. Similarly, depending on how the app is deployed,
you could create a small app that runs before the program is installed, gets
this info, saves it as XML for instance and pushes it over through
activesync (or whatever method you prefer) and you can read this file
directly to load your controls. Originally when we did the deploy this is
how we worked it but opted for the WS b/c we wanted to be able to do the
discovery on an ongoing basis. I'm not however saying that there's no other
way and/or that this code can't be used, but we wrestled with it for a few
days and couldn't get it to work reliably.

HTH,

Bill

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
 

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