Find DB

Posted on 2002-05-29
Medium Priority
Last Modified: 2010-05-02
Can I use ADO to find all DBases in SQL server 200
Question by:sycale
  • 2

Accepted Solution

raizon earned 400 total points
ID: 7042513

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

Expert Comment

ID: 7042526
Or execute the sp_databases stored procedure which is also on the master database
LVL 71

Expert Comment

by:Éric Moreau
ID: 7042634
or use OpenSchema from the Connection object

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question