J
jtammyg
Hi!
I have the following snippet that gives the name of the sql servers
installed:
Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
'just list local servers, set to false if you want to see all
servers
Dim dataTable = SmoApplication.EnumAvailableSqlServers(False)
lstServers.ValueMember = "Name"
lstServers.DataSource = dataTable
End Sub
We have only 2 sql server where the client data reside, but then we
have instances of sql installed in other machines.
I only want to be able to show in my listbox for the user to choose,
those with the sql part in their name.
e.g. tg-ny-sql001
tg-ny-sql002
so the condition would be if the name has sql in it show it in the
listbox.
How can I achieve this with VB 2008 and using SQL Server 2000 in the
first server and SQL Server 2005 in the second server?
Thanks in advanced!
Tammy
I have the following snippet that gives the name of the sql servers
installed:
Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
'just list local servers, set to false if you want to see all
servers
Dim dataTable = SmoApplication.EnumAvailableSqlServers(False)
lstServers.ValueMember = "Name"
lstServers.DataSource = dataTable
End Sub
We have only 2 sql server where the client data reside, but then we
have instances of sql installed in other machines.
I only want to be able to show in my listbox for the user to choose,
those with the sql part in their name.
e.g. tg-ny-sql001
tg-ny-sql002
so the condition would be if the name has sql in it show it in the
listbox.
How can I achieve this with VB 2008 and using SQL Server 2000 in the
first server and SQL Server 2005 in the second server?
Thanks in advanced!
Tammy