By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

Detect all SQL Server in one network

P: n/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
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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

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

" AAA" <pk***@hotmail.com> wrote in message
news:uk**************@TK2MSFTNGP15.phx.gbl...
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

Nov 21 '05 #2

P: n/a
AAA wrote:
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


Look at this:
http://www.vbcity.com/forums/faq.asp?tid=63836

Using SQLDMO or Net32API.

--
Rinze van Huizen
C-Services Holland b.v.
Nov 21 '05 #3

P: n/a
SQL-Server comes with some example source code. Look under the SQLDMO
examples at the Explorer sample in VB.

Hope this helps
Ad.

" AAA" <pk***@hotmail.com> wrote in message
news:uk**************@TK2MSFTNGP15.phx.gbl...
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

Nov 21 '05 #4

P: n/a
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.
__________________________________
" AAA" <pk***@hotmail.com> wrote in message
news:uk**************@TK2MSFTNGP15.phx.gbl...
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

Nov 21 '05 #5

P: n/a
..NET 1.1 - SQLDMO can do this.
..NET 2.0 - Here is how u do it -
http://blogs.msdn.com/sushilc/archiv...14/242395.aspx

--

- Sahil Malik [MVP]
Upcoming ADO.NET 2.0 book - http://tinyurl.com/9bync
----------------------------------------------------------------------------
---------------

" AAA" <pk***@hotmail.com> wrote in message
news:uk**************@TK2MSFTNGP15.phx.gbl...
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

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.