I know the way to list all SQL server in my lan using dmo based the
cdoe above... but is possible to have the same result with DB2
server.?
Option Explicit
Sub LIST_SQL()
Dim sqlApp As New SQLDMO.Applicat ion
Dim NameList As SQLDMO.NameList
Dim index As Long
Set NameList = sqlApp.ListAvai lableSQLServers
Me.ComboBox1.Cl ear
' local SQL Server must be added manually
Me.ComboBox1.Ad dItem "."
For index = 1 To NameList.Count
Me.ComboBox1.Ad dItem NameList.Item(i ndex)
Next
End Sub
Private Sub UserForm_Initia lize()
Call LIST_SQL
End Sub
cdoe above... but is possible to have the same result with DB2
server.?
Option Explicit
Sub LIST_SQL()
Dim sqlApp As New SQLDMO.Applicat ion
Dim NameList As SQLDMO.NameList
Dim index As Long
Set NameList = sqlApp.ListAvai lableSQLServers
Me.ComboBox1.Cl ear
' local SQL Server must be added manually
Me.ComboBox1.Ad dItem "."
For index = 1 To NameList.Count
Me.ComboBox1.Ad dItem NameList.Item(i ndex)
Next
End Sub
Private Sub UserForm_Initia lize()
Call LIST_SQL
End Sub