1

Please help me
i try to display all instances of SQL Server in a combobox.

Any help is greatly appreciated.

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by Jade_me
1

First add reference Microsoft SQLDMO Object Library.
then add this code :

Dim i As Integer
        Dim oNames As SQLDMO.NameList
        Dim oSQLApp As SQLDMO.Application
        oSQLApp = New SQLDMO.Application
        oNames = oSQLApp.ListAvailableSQLServers()
        AddHandler ComboBoxEdit4.SelectedIndexChanged, AddressOf comboBoxEdit4_SelectedIndexChanged

        For i = 1 To oNames.Count
            Me.ComboBoxEdit4.Properties.Items.Add(oNames.Item(i))

        Next i
Votes + Comments
thanks it was solved my program
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.