var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Field Descriptions through ASP
Is there any way to access the field descriptions in SQL Server 2000 using classic ASP?
What do you mean when you say field descriptions?? Are you talking about column names in a recordset or are you talking about the description field that you get in the SQL 2000 table designer?
If it is the later I don't think there is unless you start looking at the system tables.
If it is the column names of a recordset then I think there is but I would have to look it up.
Let me know which one you are after and I will provide what help I can.
yes I am talking about the description field in the table designer.
I managed to access these through the following query:
select * from INFORMATION_SCHEMA.columns
order by TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME
[Table Name] = i_s.TABLE_NAME,
[Column Name] = i_s.COLUMN_NAME,
[Description] = s.value,
[Data Type] = i_s.DATA_TYPE,
[Data Length] = i_s.CHARACTER_MAXIMUM_LENGTH
LEFT OUTER JOIN
s.id = OBJECT_ID(i_s.TABLE_SCHEMA+'.'+i_s.TABLE_NAME)
AND s.smallid = i_s.ORDINAL_POSITION
AND s.name = 'MS_Description'
OBJECTPROPERTY(OBJECT_ID(i_s.TABLE_SCHEMA+'.'+i_s. TABLE_NAME), 'IsMsShipped')=0
-- AND i_s.TABLE_NAME = 'table_name'
You'll need to establish an ADO connection from the asp script to the database, and issue your select statement via the connection.execute method. Ref ASP101 for asp database examples.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert