Solved

VB and SQL Server

Posted on 2000-05-17
2
181 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now