Solved

Find DB

Posted on 2002-05-29
3
142 Views
Last Modified: 2010-05-02
Can I use ADO to find all DBases in SQL server 200
0
Comment
Question by:sycale
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
raizon earned 100 total points
ID: 7042513
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
 
LVL 5

Expert Comment

by:raizon
ID: 7042526
Or execute the sp_databases stored procedure which is also on the master database
0
 
LVL 70

Expert Comment

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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

777 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