Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Display "Description" field on web page?

Author  Topic 

Goalie35
Yak Posting Veteran

81 Posts

Posted - 2006-03-01 : 10:14:59
I'm programming a web app in asp.net however I know most programming languages so if anyone knows a solution to the following problem, regardless of the language, your input would be greatly appreciated...

In Sql Server Enterprise Manager, when you click on "Design Table", the first property for each field within the table is called "Description". Does anyone know how or even if it's possible to display the contents of this description property on a web page?

I've done this in MS Access however I can't find a solution for Sql Server.

Thanks in advance.

-Goalie35

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-03-01 : 10:40:03
Use Pubs
CREATE table T1 (F1 int , F2 varchar (9))

-- Add some description to the description of the fields of the above table (may be manually)

-- Run the following in Query analyzer
-- no need to substitute for anything - just select & execute
SELECT   *
FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', 'T1', 'column', default)
Where [Name] = 'MS_Description'
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-02 : 01:52:25
or

select * from sysproperties where id=object_id('tableName')

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -