-
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
-
Hi,
Code:
select * from master..sysdatabases
Roger
-
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.