Solved

VB and SQL Server

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

813 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

10 Experts available now in Live!

Get 1:1 Help Now