SQL Server column description 
Author Message
 SQL Server column description

Hi all,

New to SQL Server 2000 is a column description, within table
properties.  BOL describes it as an extended property.  Does anyone
know how to access this via ADO?  I am designing a generic query
interface for our intranet site, and would like to display the column
description for SELECT statements that are built by the user.  My
VBScript code fragments look like this:

  Set objConn = Server.CreateObject("ADODB.Connection")
        objConn.Open Application("Connection1_ConnectionString")
                   .
                   .
  Set objPagingRS = Server.CreateObject("ADODB.Recordset")
                   .
          [build SQL statement]
                   .
  objPagingRS.Open mySQL, objConnDEV, adOpenStatic, adLockReadOnly,
adCmdText
                   .
                   .
'display column name:
response.write "<td bgcolor=""#C0C0C0"" align=""left""
valign=""bottom"" nowrap><font face=""Courier New"" size=""2""
color=""#000000"">" & objPagingRS(i).name&"</font></td>"

Any thoughts much appreciated!
Tim van Laun



Wed, 25 Feb 2004 00:51:39 GMT  
 SQL Server column description

Hi Tim.

Take a look at fn_listextendedproperty in BOL.

Hugo Silva

MCT MCSE MCSD MCDBA


Quote:
>Hi all,

>New to SQL Server 2000 is a column description, within table
>properties.  BOL describes it as an extended property.  Does anyone
>know how to access this via ADO?  I am designing a generic query
>interface for our intranet site, and would like to display the column
>description for SELECT statements that are built by the user.  My
>VBScript code fragments look like this:

>  Set objConn = Server.CreateObject("ADODB.Connection")
>    objConn.Open Application("Connection1_ConnectionString")
>                   .
>                   .
>  Set objPagingRS = Server.CreateObject("ADODB.Recordset")
>                   .
>          [build SQL statement]
>                   .
>  objPagingRS.Open mySQL, objConnDEV, adOpenStatic, adLockReadOnly,
>adCmdText
>                   .
>                   .
>'display column name:
>response.write "<td bgcolor=""#C0C0C0"" align=""left""
>valign=""bottom"" nowrap><font face=""Courier New"" size=""2""
>color=""#000000"">" & objPagingRS(i).name&"</font></td>"

>Any thoughts much appreciated!
>Tim van Laun

Hugo Silva


Wed, 25 Feb 2004 01:28:29 GMT  
 SQL Server column description
This is a good starting point, but I wrote an article in SQL Server magazine
not long ago about Extended properties. See my web site for details.

--
William (Bill) Vaughn
President Beta V Corporation
www.betav.com


Quote:

> Hi Tim.

> Take a look at fn_listextendedproperty in BOL.

> Hugo Silva

> MCT MCSE MCSD MCDBA


> >Hi all,

> >New to SQL Server 2000 is a column description, within table
> >properties.  BOL describes it as an extended property.  Does anyone
> >know how to access this via ADO?  I am designing a generic query
> >interface for our intranet site, and would like to display the column
> >description for SELECT statements that are built by the user.  My
> >VBScript code fragments look like this:

> >  Set objConn = Server.CreateObject("ADODB.Connection")
> > objConn.Open Application("Connection1_ConnectionString")
> >                   .
> >                   .
> >  Set objPagingRS = Server.CreateObject("ADODB.Recordset")
> >                   .
> >          [build SQL statement]
> >                   .
> >  objPagingRS.Open mySQL, objConnDEV, adOpenStatic, adLockReadOnly,
> >adCmdText
> >                   .
> >                   .
> >'display column name:
> >response.write "<td bgcolor=""#C0C0C0"" align=""left""
> >valign=""bottom"" nowrap><font face=""Courier New"" size=""2""
> >color=""#000000"">" & objPagingRS(i).name&"</font></td>"

> >Any thoughts much appreciated!
> >Tim van Laun

> Hugo Silva



Thu, 26 Feb 2004 04:39:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. SQL Server Column Descriptions

2. SQL Server 2000: Create column descriptions via code

3. SQL Server Field Descriptions and Microsoft Access Field Descriptions

4. SQL Column Description

5. Modifying Format and Description properties on SQL Server field

6. SQL SERVER + IDENTITY column + DbSeeChanges PROBLEM

7. Run time error 3622: OpenRecordSet: SQL server table: IDENTITY column

8. Retrieving an Image from SQL Server Image column (binary)

9. Searching a Text column (SQL Server 6.5)

10. RDO, SQL Server and IDENTITY columns

11. VB, SQL Server, RDO, ODBC and Timestamp column manipulation

12. SQL Server/VB (Identity Column)

 

 
Powered by phpBB® Forum Software