Solved

VB and SQL Server

Posted on 2000-05-17
2
185 Views
Last Modified: 2010-05-02
How can I get the list of databases in a SQL Server without using SQLDMO library?
0
Comment
Question by:lasko012900
[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 Comments
 
LVL 2

Accepted Solution

by:
DanAvni earned 50 total points
ID: 2819923
connect to a database on the sql server called master and run to following query:

SELECT name FROM sysdatabases
0
 

Expert Comment

by:tapsbin
ID: 2823413
The otherway is you can try the following

SELECT name, id
FROM   sysobjects
WHERE  type = 'U'

of course, by connecting to the master table of SQL server.

and if you are doing some kind of objectid storage within the VB application, you can utilize that too directly...by running the following query.....

SELECT object_name(192009989)

where object_name is the complimentary function.

tapsbin

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending a email via excel using vba 6 119
VBA filters 2 81
TT Auto Dashboard 13 104
can this macro be converted to sub procedure 4 34
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

751 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