Please help me
i try to display all instances of SQL Server in a combobox.
Any help is greatly appreciated.
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
Yosha...
what a great code..
Thank you dude...
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.