• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 150
  • Last Modified:

Find DB

Can I use ADO to find all DBases in SQL server 200
0
sycale
Asked:
sycale
  • 2
1 Solution
 
raizonCommented:
yes,

connect to the master Database then

query against the sysdatabases table.

Set oconn = New ADODB.COnnection
Set oRs = New ADODB.Recordset

sql = "SELECT name from sysdatabases"

oRs.Open sql, oconn
0
 
raizonCommented:
Or execute the sp_databases stored procedure which is also on the master database
0
 
Éric MoreauSenior .Net ConsultantCommented:
or use OpenSchema from the Connection object
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now