|
 |
asp_databases thread: RE: Table Descriptions
Message #1 by "Craig Flannigan" <ckf@k...> on Wed, 10 Apr 2002 08:33:43 +0100
|
|
Yes.
<%
For x=0 to objRST.fields.count - 1
Response.write objRST.Fields(x).Name & "<br>"
Response.write objRST.Fields(x).Type
Next
%>
The field type will come back as a number.
To change this to text, this code below could be used within your For...Next
or as a function called from the loop
<%
Select case objRST.Fields(x).Type
Case 3
Response.write "Number"
Case 6
Response.write "Currency"
Case 11
Response.write "Yes/No"
Case 135
Response.write "Date"
Case 200
Response.write "Text"
End select
%>
Hope this helps
Craig.
-----Original Message-----
From: Davis, John (Greer) [mailto:John.Davis2@H...]
Sent: 09 April 2002 21:19
To: ASP Databases
Subject: [asp_databases] Table Descriptions
I was wondering how one could get a description of all the fields in a table
from asp. Like in Access when design is
clicked the Field Name, Data Type, and any Description. In Oracle this is
done with the desc command, however I havn't
been able to find anything similar in asp. thanks for your help.
John Davis
Honeywell Aerospace Services
Information Technology Support
* (xxx) xxx-xxxx
* <mailto:John.Davis2@h...>
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service on behalf of
Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service on behalf of Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 10 Apr 2002 16:53:50 +1000
|
|
Use either the ADO Schema, or an ADOX Catalog.
Here's an example of using the ADO Schema that might get you started:
http://www.learnasp.com/learn/dbschemasall.asp
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Davis, John (Greer) " <John.Davis2@H...>
Subject: [asp_databases] Table Descriptions
: I was wondering how one could get a description of all the fields in a
table from asp. Like in Access when design is
: clicked the Field Name, Data Type, and any Description. In Oracle this is
done with the desc command, however I havn't
: been able to find anything similar in asp. thanks for your help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "Davis, John (Greer) " <John.Davis2@H...> on Tue, 9 Apr 2002 13:18:44 -0700
|
|
I was wondering how one could get a description of all the fields in a table from asp. Like in Access
when design is
clicked the Field Name, Data Type, and any Description. In Oracle this is done with the desc command, however I havn't
been able to find anything similar in asp. thanks for your help.
John Davis
Honeywell Aerospace Services
Information Technology Support
* (xxx) xxx-xxxx
* <mailto:John.Davis2@h...>
|
|
 |