Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Searching for installed SQL Server Instances

Searching for installed SQL Server Instances

Scheduled Pinned Locked Moved Visual Basic
sysadmindatabasesql-serveralgorithmsquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Ekjon
    wrote on last edited by
    #1

    Hi, In my application - I need to search for installed SQL Server instances on the wotkstation or network; so I can create the appropriate connection string and also for allowing the user to install sql server express if no sql server is installed. Is there any way? Thanks, Ekjon

    D D 2 Replies Last reply
    0
    • E Ekjon

      Hi, In my application - I need to search for installed SQL Server instances on the wotkstation or network; so I can create the appropriate connection string and also for allowing the user to install sql server express if no sql server is installed. Is there any way? Thanks, Ekjon

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Check out SqlDataSourceEnumerator class. That will help you getting the list of SQL server instances on the network.

      It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

      1 Reply Last reply
      0
      • E Ekjon

        Hi, In my application - I need to search for installed SQL Server instances on the wotkstation or network; so I can create the appropriate connection string and also for allowing the user to install sql server express if no sql server is installed. Is there any way? Thanks, Ekjon

        D Offline
        D Offline
        Dambod
        wrote on last edited by
        #3

        u can use sqldatasourceenumerator to get the available sql instances like Dim dt As New DataTable dt= Sql.SqlDataSourceEnumerator.Instance.GetDataSources DataGridView1.DataSource = dt.AsDataView

        E 1 Reply Last reply
        0
        • D Dambod

          u can use sqldatasourceenumerator to get the available sql instances like Dim dt As New DataTable dt= Sql.SqlDataSourceEnumerator.Instance.GetDataSources DataGridView1.DataSource = dt.AsDataView

          E Offline
          E Offline
          Ekjon
          wrote on last edited by
          #4

          Thanks d@nish and Dambod - it was very helpful.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups