Thursday, March 22, 2012

ASP script to display database structure?

Posted this to SQLServer.Tools, but maybe it belongs here...
Does anyone have an ASP script that I can use to dump the structure of an MS
SQL 2000 database?
The firewall here won't allow any remote connections through, and our DB
host does not have any web administration.
I just need the table names, field names, and field data types.
Thx!would information_schema.tables and information_schema.columns do?
Just join the views and select the columns you need.
SELECT *
FROM information_schema.tables t
JOIN information_schema.columns c
ON t.table_schema = c.table_schema
AND t.table_name = c.table_name
"Noozer" wrote:

> Posted this to SQLServer.Tools, but maybe it belongs here...
>
> Does anyone have an ASP script that I can use to dump the structure of an
MS
> SQL 2000 database?
> The firewall here won't allow any remote connections through, and our DB
> host does not have any web administration.
> I just need the table names, field names, and field data types.
> Thx!
>
>|||Thanks!
That did the trick!
"Nigel Rivett" <NigelRivett@.discussions.microsoft.com> wrote in message
news:46273214-5138-4D9F-A0EB-7C1AC0B70344@.microsoft.com...
> would information_schema.tables and information_schema.columns do?
> Just join the views and select the columns you need.
> SELECT *
> FROM information_schema.tables t
> JOIN information_schema.columns c
> ON t.table_schema = c.table_schema
> AND t.table_name = c.table_name

No comments:

Post a Comment