|
-
August 24th, 2001, 12:29 PM
#1
list all databases from a selected server
hi..
Anybody know how can i list all my databases from "x" server?...
I already list the servers.. but now i have to fill my combo.. with the databases...
so.. any help????
thanks....
-
August 24th, 2001, 02:48 PM
#2
Re: list all databases from a selected server
Is it a SQL Server database?
-
August 24th, 2001, 03:03 PM
#3
Re: list all databases from a selected server
that´s right... thats a sql server..
and i use trusted and no trusted connections
.. do u know a way to do this?
-
August 24th, 2001, 03:15 PM
#4
Re: list all databases from a selected server
Each SQL Server has a table called 'sysdatabases' that is located in the 'master' database. This table keeps track of all databases in that particular server.. How to do this?
Connect to the master database using ADO or whatever you're using.. use the following SQL statement
"SELECT name FROM sysdatabases ORDER BY name"
That should do it..
-
August 24th, 2001, 04:36 PM
#5
Re: list all databases from a selected server
hi..
but if i use this.. i need to open the connection... do i????
-
August 27th, 2001, 01:15 PM
#6
Re: list all databases from a selected server
Yes.. You open the connection to that SQL server and you connect to the master database
-
August 27th, 2001, 06:13 PM
#7
Re: list all databases from a selected server
For Sql server, you can try 'sp_databases'.
Regards,
Michi
-
September 10th, 2001, 03:07 PM
#8
Re: list all databases from a selected server
but i cant open the connection yet...
cause i need to fill my combo and then i can choose my server and then i can choose the databases from that server.. and then i can open the connection using trusted or not trusted..
do u know waht i mean??
it´s a form for login...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|