How to list all databases on MS SQL server in VB?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TroyDDaniels
    New Member
    • Apr 2007
    • 2

    #1

    How to list all databases on MS SQL server in VB?

    I am wondering how to get a list of all the names of the databases on the server, from beginning to end. I have no clue where to start with this, meaning I am not sure how to connect to just the server and then query it for the database names. I don't know what variables to declare or what connections to use. If anyone can help it would be much appreciated.

    Thanks
  • ansumansahu
    New Member
    • Mar 2007
    • 149

    #2
    Originally posted by TroyDDaniels
    I am wondering how to get a list of all the names of the databases on the server, from beginning to end. I have no clue where to start with this, meaning I am not sure how to connect to just the server and then query it for the database names. I don't know what variables to declare or what connections to use. If anyone can help it would be much appreciated.

    Thanks
    SQL Distributed Management Objects (SQL-DMO) is a collection of objects encapsulating Microsoft SQL Server database management and replication management. These objects are available through a Development library called SQLDMO.DLL from Microsoft. I think you can use this in your VB prgram to get the list of database from the SQL server.

    -ansuman sahu

    Comment

    • TroyDDaniels
      New Member
      • Apr 2007
      • 2

      #3
      Originally posted by ansumansahu
      SQL Distributed Management Objects (SQL-DMO) is a collection of objects encapsulating Microsoft SQL Server database management and replication management. These objects are available through a Development library called SQLDMO.DLL from Microsoft. I think you can use this in your VB prgram to get the list of database from the SQL server.

      -ansuman sahu
      Thanks, I appreciate it.

      Comment

      Working...