Click to See Complete Forum and Search --> : Listing all databases on a SQL Server machine
MPardo
Jan 3rd, 2000, 01:28 AM
Anyone know how to retrieve the listing of all the databases available on a SQL Server machine thru code? I would like the user to enter the name of the server and display all the databases available. Very similar to what happens when you are setting up a connection the a particular DB. Thanks!
Matt
RogerH
Jan 3rd, 2000, 01:32 AM
Hi,
select * from master..sysdatabases
Roger
MPardo
Jan 3rd, 2000, 06:51 AM
Thanks for the help...
I found a different solution in case anyone runs across the same problem. I used the OpenSchema method on the connection object after I opened a connection but didn't specify the initial catalog. There is alot of good information you can get from that.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.