Eternal Newbie 30 Newbie Poster

I have a combo box which help me select SQL servers in my local computer, but now I want it to be able to select just any connected servers (like remote servers) as possible, how could I solve it???

Sub server(ByVal str As String)
        con = New SqlConnection("Data Source=" & str & ";Database=Master;integrated security=SSPI;")
        con.Open()
        cmd = New SqlCommand("select *  from sysservers  where srvproduct='SQL Server'", con)
        dread = cmd.ExecuteReader
        While dread.Read
            cmbservername1.Items.Add(dread(2))
        End While
        dread.Close()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.