Monday, February 27, 2012

How can I get the name of databases

Hi,
How can I get the name of the databases from SQL 2000, to a combo box.
Thanks
DibSELECT name
FROM master..sysdatabases
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>|||Hi
select [name] from master.dbo.sysdatabases
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>|||A combo box where? VB? ASP? ...?
The query part of it is:
SELECT name FROM master.dbo.sysdatabases ORDER BY name
To populate the combobox using this query, please see a newsgroup dedicated
to whatever technology you are using to create the combobox...
http://www.aspfaq.com/
(Reverse address to reply.)
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>

No comments:

Post a Comment