Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving SQL Server Database List

Status
Not open for further replies.

culshaja

Programmer
Aug 10, 1999
705
GB
Hi,

I want to get access to the list of SQL Server databases that the user currentl has defined on their machine. Its to produce a drop down list like the one you see in Query Analyser. I have tried accessing the registry but I am having a few problems.

James :) James Culshaw
jculshaw@active-data-solutions.co.uk
 
Hi,

Use SQLDMO object library to retrieve the database list.
Refer books online, Search for SQLDMO.

In MSDN search for SQLDMO->CREATE TABLE.

u will find the sample code.

In Visual Basic using references add SQL DMO object library and create the instance of SQLDMO and u will find lot of methods.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top