?
Solved

Find DB

Posted on 2002-05-29
3
Medium Priority
?
147 Views
Last Modified: 2010-05-02
Can I use ADO to find all DBases in SQL server 200
0
Comment
Question by:sycale
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
raizon earned 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

770 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