Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

VB and SQL Server

How can I get the list of databases in a SQL Server without using SQLDMO library?
0
lasko012900
Asked:
lasko012900
1 Solution
 
DanAvniCTOCommented:
connect to a database on the sql server called master and run to following query:

SELECT name FROM sysdatabases
0
 
tapsbinCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now