Ask a Question related to ASP Database, Design and Development.
-
Robert #1
ASP Code to generate the schema of an SQL Table (field name, Data types , Size)
Anyone has this SQL STATEMENT to traverse the User defined tables?
I just need the Select Statement to get this info the rest I can handle.
I am not interested is revealing the system table information just my
created tables schema.
Psuedo code like as follows:
dim cn ' ADOVBS.Connection
dim rsUserTableNames ' ADOVBS.Recordset
dim vTable ' variant
dim fldUserTableFieldNames ' ADOVBS.Fields
dim vFld ' variant
Set cn =
Server.CreateObject("ADODB.Connection")
Set rsUserTableNames =
Server.CreateObject("ADODB.Recordset")
Set cn = CreateObject( I don't
need this)
Set rsUserTableNames = CreateObject( "I need this SQL
Statement") <--- SQL STATEMENT to traverse the User defined tables???
For each vTable in rsUserTableNames
Response.Write vTableName.Name & <br> & <br> & <br>
For each vFld in vTableName
Response.write vFld.Name & <br> & vFld.Type & <br> &
vFld.Size
next
next
Thank you for your assistance
Robert H. Weinstein
Associate Programmer Analyst (Specialist)
Office of Technology Resources
Robert Guest
-
Alter Table / Changing field types in SQL
Hi Folks - I was wondering if anybody knows of some way to convert a field within a MS SQL table from varchar to Numeric. A table was set up... -
schema data types
hi all, i want to know a small clarification. in the schema data types, there are two data types for handling numeric digits.... what is the... -
Trying to generate classes from an XSD schema
Hi, I'm new to web services so please forgive. For some reason I'm unable to generate classes for the schema... -
Disparity between XML Schema types and .Net CLS types
Hello. The following link lists the mapping of XML Schema types to .Net Framework types:... -
How to generate a document from table schema?
In article <bc503f80.0306270809.50bdb2cd@posting.google.com>, dnlchou@yahoo.com says... I've done that with Sybase PowerDesigner. After 'reverse... -
Bob Barrows #2
Re: ASP Code to generate the schema of an SQL Table (field name, Data types , Size)
Robert wrote:
In SQL Server 7 and above, there are a group of Views owned by the> Anyone has this SQL STATEMENT to traverse the User defined tables?
>
INFORMATION_SCHEMA login: INFORMATION_SCHEMA.Tables,
INFORMATION_SCHEMA.Columns, etc. These views contain the information you are
looking for. You can simply run a query against them to get the needed
information. See SQL Books Online (BOL) for more information.
HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows Guest
-
Jeff Cochran #3
Re: ASP Code to generate the schema of an SQL Table (field name, Data types , Size)
On Tue, 23 Dec 2003 13:21:36 -0800, "Robert" <nospam@hotmail.com>
wrote:
Does this help?>Anyone has this SQL STATEMENT to traverse the User defined tables?
[url]http://www.aspfaq.com/show.asp?id=2178[/url]
Jeff
>
>I just need the Select Statement to get this info the rest I can handle.
>
>I am not interested is revealing the system table information just my
>created tables schema.
>
>Psuedo code like as follows:
>
> dim cn ' ADOVBS.Connection
> dim rsUserTableNames ' ADOVBS.Recordset
> dim vTable ' variant
> dim fldUserTableFieldNames ' ADOVBS.Fields
> dim vFld ' variant
>
> Set cn =
>Server.CreateObject("ADODB.Connection")
> Set rsUserTableNames =
>Server.CreateObject("ADODB.Recordset")
>
> Set cn = CreateObject( I don't
>need this)
>
> Set rsUserTableNames = CreateObject( "I need this SQL
>Statement") <--- SQL STATEMENT to traverse the User defined tables???
>
> For each vTable in rsUserTableNames
> Response.Write vTableName.Name & <br> & <br> & <br>
> For each vFld in vTableName
> Response.write vFld.Name & <br> & vFld.Type & <br> &
>vFld.Size
> next
> next
>
>Thank you for your assistance
>
>Robert H. Weinstein
>Associate Programmer Analyst (Specialist)
>Office of Technology Resources
>Jeff Cochran Guest



Reply With Quote

