display network SQL Servers in combobox

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Dec 2007
Posts: 252
Reputation: ProfessorPC is an unknown quantity at this point 
Solved Threads: 27
ProfessorPC ProfessorPC is offline Offline
Posting Whiz in Training

display network SQL Servers in combobox

 
0
  #1
May 31st, 2008
I have searched and I have searched but I can't find a way to display all instances of SQL Server in a combobox.

Any help is greatly appreciated.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 252
Reputation: ProfessorPC is an unknown quantity at this point 
Solved Threads: 27
ProfessorPC ProfessorPC is offline Offline
Posting Whiz in Training

Re: display network SQL Servers in combobox

 
0
  #2
May 31st, 2008
found the solution on microsoft of all places.

  1. Dim i As Integer
  2. Dim oNames As SQLDMO.NameList
  3. Dim oSQLApp As SQLDMO.Application
  4. oSQLApp = New SQLDMO.Application
  5. oNames = oSQLApp.ListAvailableSQLServers()
  6. AddHandler ComboBoxEdit4.SelectedIndexChanged, AddressOf comboBoxEdit4_SelectedIndexChanged
  7.  
  8. For i = 1 To oNames.Count
  9. Me.ComboBoxEdit4.Properties.Items.Add(oNames.Item(i))
  10.  
  11. Next i
Last edited by ProfessorPC; May 31st, 2008 at 10:41 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: display network SQL Servers in combobox

 
0
  #3
May 31st, 2008
Hi...Thanks for the share friend
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 252
Reputation: ProfessorPC is an unknown quantity at this point 
Solved Threads: 27
ProfessorPC ProfessorPC is offline Offline
Posting Whiz in Training

Re: display network SQL Servers in combobox

 
0
  #4
May 31st, 2008
No problem. If I post a problem and find the solution I post it so others can see either how easy it is and how slow I am or the solution in general

I forgot to add that I had to reference Microsoft SQLDMO Object Library
Last edited by ProfessorPC; May 31st, 2008 at 11:28 am.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC