| Business Application Development with: SQL Server, C#, VB, VB.Net, ASP, ASP.Net, and XML |
| N | S |
Novick Software Management • Design • Programming • Training • Consulting |
|
|
News Links Schedule Site Map Contact |
|
Tips and Tricks for: SQL Server 2000The Problem: How to create a SQLPROPERTY value over 255 characterWhen using SQL Query Analyzer's user interface, extended properties, such as descriptions may only be 256 character. Recently I was asked how to create a longer property so that documentation for a stored procedure could be saved in sysproperties. Solution: sp_addextendedproperty allows the addition of large properties.The user interface of SQL Query Analyzer may have a 256 character limitation but if you examine the sysproperties table, which is in every database, you'll find that the value column is a sql_variant. sql_variant can hold any SQL type that can fit into the row. There are actually three stored procedures for managing extended properties:
Here's a script that shows how to add a long description for a stored procedure: DECLARE
@RC int Once the extended property has been added to the database, you'll have to use the fn_listextendedproperty system user-defined function. See Chapter 15 of Transact-SQL User-Defined Fucntions for a complete explanation of this UDF.
|
|
|
Copyright © 2003-2008 Novick Software, Inc. | Terms of Use | Privacy Policy | Nice Things People Say| |