|
-
Nov 8th, 2000, 01:46 PM
#1
Thread Starter
New Member
I was wondering if anyone could tell me how to obtain a list of the available databases on an SQL Server, and also a list of tables inside of a particular database on the SQL Server. I am wanting to add them to a list box so that the user can choose his database and table from a dynamically updated list.
Any information would be greatly appreciated.
Thanks,
Green Onyx
-
Nov 8th, 2000, 05:46 PM
#2
New Member
List of databases (names):
Connect to "master" database(you must have permission)
"SELECT name FROM sysdatabases"
List of tables in database:
Connect to database
"SELECT name FROM sysobjects where type='U'"
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
|