September 10, 2008 at 5:08 am
accessing named instances
--------------------------------------------------------------------------------
hello
I installed two named insances of SQL Server 2005 on Win 2003 server.
I hv written small appl which list out all the insances of SQL Server available on network .
but it is not working , it is displaying only names of SQL Server.
Code---
Dim dtSQLServers As DataTable
dtSQLServers = SmoApplication.EnumAvailableSqlServers()
Dim strServer As String
For Each dr As DataRow In dtSQLServers.Rows
strServer = CStr(dr("Server"))
'strServer = dr("Server") & "\" & CStr(dr("Instance"))
If Not TypeOf dr("Instance") Is DBNull AndAlso CStr(dr("Instance")).Length > 0 Then
strServer += "\" & CStr(dr("Instance"))
End If
comboServer.Items.Add(strServer)
Next
----------------
is there any other method for this.
Firewall is off on server.
Thanks
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy