Display Filed Description, Filed Data Type on ASP Page

Display Filed Description, Filed Data Type on ASP Page

Post by Simes » Fri, 25 Jan 2002 04:15:31



I am using following code to display Field Name and Field Value from
table.

******************
sqlQuery = "SELECT * FROM tblTableName WHERE ID =" & intRecordID
Set Table = Conn.Execute(sqlQuery)
intFieldCount = Table.Fields.Count - 1

For i = 0 To intFieldCount
        strName = Table(i).Name
        strValue = Table(i).Value

        Response.Write(strName & " : " & strValue & "<br>")
Next
*******************

But beside this I would also like to display Filed Description, Filed
Data Type (Text, Memo, Number) and other Filed Properties (Filed
Size, Default Value, etc)

How can I accomplish this?

Thanks ahead, John.

 
 
 

Display Filed Description, Filed Data Type on ASP Page

Post by Val Mazu » Fri, 25 Jan 2002 04:32:31


Hi,

Try to use OpenSchema method of ADO connection. It returns
different information about fileds and tables

Val

Quote:>-----Original Message-----
>I am using following code to display Field Name and Field
Value from
>table.

>******************
>sqlQuery = "SELECT * FROM tblTableName WHERE ID =" &
intRecordID
>Set Table = Conn.Execute(sqlQuery)
>intFieldCount = Table.Fields.Count - 1

>For i = 0 To intFieldCount
>    strName = Table(i).Name
>    strValue = Table(i).Value

>    Response.Write(strName & " : " & strValue & "<br>")
>Next
>*******************

>But beside this I would also like to display Filed
Description, Filed
>Data Type (Text, Memo, Number.) and other Filed
Properties (Filed
>Size, Default Value, etc.)

>How can I accomplish this?

>Thanks ahead, John.
>.


 
 
 

Display Filed Description, Filed Data Type on ASP Page

Post by MVP » Fri, 25 Jan 2002 09:15:34


Properties, Methods, and Events
http://msdn.microsoft.com/library/

Anything like "Description" might be in the Properties collection but is provider dependent.

--
Michael Harris
Microsoft.MVP.Scripting
--


> I am using following code to display Field Name and Field Value from
> table.

> ******************
> sqlQuery = "SELECT * FROM tblTableName WHERE ID =" & intRecordID
> Set Table = Conn.Execute(sqlQuery)
> intFieldCount = Table.Fields.Count - 1

> For i = 0 To intFieldCount
> strName = Table(i).Name
> strValue = Table(i).Value

> Response.Write(strName & " : " & strValue & "<br>")
> Next
> *******************

> But beside this I would also like to display Filed Description, Filed
> Data Type (Text, Memo, Number.) and other Filed Properties (Filed
> Size, Default Value, etc.)

> How can I accomplish this?

> Thanks ahead, John.

 
 
 

Display Filed Description, Filed Data Type on ASP Page

Post by AdoAnywhere Tea » Fri, 25 Jan 2002 09:42:19


You will find an very useful tool for OpenSchema at this link,
http://www.adoanywhere.com/download/aaBrowse2_7.zip

--
Michael Collier Bsc (Hons) Comp Sci
ADO Support Tools.
Fully Working 15-Day Trial...
http://www.adoanywhere.com/download/aaBrowse2_7.zip
Home Page
http://www.adoanywhere.com

Quote:> Hi,

> Try to use OpenSchema method of ADO connection. It returns
> different information about fileds and tables

> Val

> >-----Original Message-----
> >I am using following code to display Field Name and Field
> Value from
> >table.

> >******************
> >sqlQuery = "SELECT * FROM tblTableName WHERE ID =" &
> intRecordID
> >Set Table = Conn.Execute(sqlQuery)
> >intFieldCount = Table.Fields.Count - 1

> >For i = 0 To intFieldCount
> > strName = Table(i).Name
> > strValue = Table(i).Value

> > Response.Write(strName & " : " & strValue & "<br>")
> >Next
> >*******************

> >But beside this I would also like to display Filed
> Description, Filed
> >Data Type (Text, Memo, Number.) and other Filed
> Properties (Filed
> >Size, Default Value, etc.)

> >How can I accomplish this?

> >Thanks ahead, John.
> >.

 
 
 

Display Filed Description, Filed Data Type on ASP Page

Post by Raymond W Giamon » Mon, 04 Feb 2002 08:52:18


Have you tried the Field properties Description, Type, Size, DefaultValue?

Quote:> I am using following code to display Field Name and Field Value from
> table.

> ******************
> sqlQuery = "SELECT * FROM tblTableName WHERE ID =" & intRecordID
> Set Table = Conn.Execute(sqlQuery)
> intFieldCount = Table.Fields.Count - 1

> For i = 0 To intFieldCount
> strName = Table(i).Name
> strValue = Table(i).Value

> Response.Write(strName & " : " & strValue & "<br>")
> Next
> *******************

> But beside this I would also like to display Filed Description, Filed
> Data Type (Text, Memo, Number.) and other Filed Properties (Filed
> Size, Default Value, etc.)

> How can I accomplish this?

> Thanks ahead, John.