Detect all SQL Server in one network

  • Thread starter Thread starter AAA
  • Start date Start date
A

AAA

Hi,

How can I detect all SQL Server, and show all server name in a combo box in
vb.net ?

Thank you very much


Regards
 
Hi,

Add a reference to microsoft sqldmo object library in the com
tab.

Dim sqlServers As SQLDMO.NameList

Dim sqlServer As String

' Get a list of servers

sqlServers = New SQLDMO.Application().ListAvailableSQLServers

For Each sqlServer In sqlServers

Debug.WriteLine(sqlServer)

Next



Ken

-----------------------------

Hi,

How can I detect all SQL Server, and show all server name in a combo box in
vb.net ?

Thank you very much


Regards
 
SQL-Server comes with some example source code. Look under the SQLDMO
examples at the Explorer sample in VB.

Hope this helps
Ad.
 
This is also supported in ADO.NET 2.0 and I'll be showing a sample on
Saturday...

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
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

Back
Top