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. Get name of SQLserver 2000 with VB.net 2003

Get name of SQLserver 2000 with VB.net 2003

Scheduled Pinned Locked Moved Visual Basic
sysadminquestioncsharphelp
6 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.
  • M Offline
    M Offline
    minhnguyen08
    wrote on last edited by
    #1

    Hi! Counld you help me please? I want to get the name of SQLServer 2000 and put it into a combobox, SQLServer may be on my computor and may be on Server in my network (my computor is a workstation but it has SQLServer 2000 too). How can I do that, I until use vb.net 2003 Thanks a lot.

    H V 2 Replies Last reply
    0
    • M minhnguyen08

      Hi! Counld you help me please? I want to get the name of SQLServer 2000 and put it into a combobox, SQLServer may be on my computor and may be on Server in my network (my computor is a workstation but it has SQLServer 2000 too). How can I do that, I until use vb.net 2003 Thanks a lot.

      H Offline
      H Offline
      Hasan Jaffal
      wrote on last edited by
      #2

      plz i need it badly too

      V 1 Reply Last reply
      0
      • M minhnguyen08

        Hi! Counld you help me please? I want to get the name of SQLServer 2000 and put it into a combobox, SQLServer may be on my computor and may be on Server in my network (my computor is a workstation but it has SQLServer 2000 too). How can I do that, I until use vb.net 2003 Thanks a lot.

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        You may need to use SQLDMO http://www.csharphelp.com/archives2/archive342.html[^]

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        H M 2 Replies Last reply
        0
        • H Hasan Jaffal

          plz i need it badly too

          V Offline
          V Offline
          Vasudevan Deepak Kumar
          wrote on last edited by
          #4

          Refer the original thread: http://www.codeproject.com/script/comments/forums.asp?forumid=1646&select=1831430&fr=51&df=100#xx1831430xx[^]

          Vasudevan Deepak Kumar Personal Homepage Tech Gossips

          1 Reply Last reply
          0
          • V Vasudevan Deepak Kumar

            You may need to use SQLDMO http://www.csharphelp.com/archives2/archive342.html[^]

            Vasudevan Deepak Kumar Personal Homepage Tech Gossips

            H Offline
            H Offline
            Hasan Jaffal
            wrote on last edited by
            #5

            i use vb.net 2003 and not c #

            1 Reply Last reply
            0
            • V Vasudevan Deepak Kumar

              You may need to use SQLDMO http://www.csharphelp.com/archives2/archive342.html[^]

              Vasudevan Deepak Kumar Personal Homepage Tech Gossips

              M Offline
              M Offline
              minhnguyen08
              wrote on last edited by
              #6

              Hi! I had refer that URL, but until get error message I had reference SQLDMO and declare: private SQLDMO.Application sqlApp = new SQLDMO.ApplicationClass(); SQLDMO.NameList sqlServers=null; this is my code: private void Form1_Load(object sender, System.EventArgs e) { try { sqlServers = sqlApp.ListAvailableSQLServers(); for(int i=0;i 0) this.cboServers.SelectedIndex = 0; else this.cboServers.Text = ""; } catch(Exception err) { MessageBox.Show(err.ToString(),"Error"); } } and i get an error: System.InvalidCastException:QueryInterface for interface SQLDMO.NameList faild at SQLDMO.ApplicationClass.ListAvailableSQLServer() at .... Cuold you help me, please.

              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