Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Retrieve all the installed SQL server istances
 

Retrieve all the installed SQL server istances

Dear every body
i want to retrieve all the installed sql server instances includes the loaca instances
i write this block of code

Code Snippet

Dim lst As Sql.SqlDataSourceEnumerator
lst = Sql.SqlDataSourceEnumerator.Instance
Dim dt As DataTable = lst.GetDataSources
cmbServerLst.Items.Clear()
For Each row In dt.Rows

If row("InstanceName").ToString() = "" Then
cmbServerLst.Items.Add(row("ServerName").ToString())
Else
cmbServerLst.Items.Add(row("ServerName").ToString() + "\" + row("InstanceName").ToString())
End If

Next



this retrieve insatnces in the network but not included the instances installed on my machine
can any help me to know how to retrieve also the local installed instances
(f)
m_3ryan  Monday, February 18, 2008 4:27 PM

Hi m_3ryan,

You can try to use the method describe in the following article:

Let me know if this helps.

Best regards.
Rong-Chun Zhang

Rong-Chun Zhang  Friday, February 22, 2008 12:37 PM

You can use google to search for other answers

Custom Search

More Threads

• VB.NET for pocket pc
• Performance problem. Page faults.
• Add button to leftmost column's header cell in DataGridView?
• DataGrid RowHeight
• VB.NET update problems
• How to set the Grid View Column Header text non visible
• datagridview "subrow" in one "row"
• DataSet and memory
• How to make a datagridview row "un-dirty"?
• DataGridView adds two new rows on 'escape'