急问:如何读出SqlServer中对一个字段的描述

daibird 2001-12-15 01:21:22
rs(i).name是读出字段名称,如何读出对这个字段的描述呢??
...全文
717 4 打赏 收藏 举报
写回复
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
daibird 2001-12-16
  • 打赏
  • 举报
回复
万分感谢!!
问题解决了!怎么能给分呢?
N_chow 2001-12-15
  • 打赏
  • 举报
回复
--用系統的Function來讀。fn_listextendedproperty的用法更多的可參可Books online
SELECT *
FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', 'table名字', 'column', default)

--把table名字換成你的table名字,其它的不要動,在Query Analyzer里試一試:)
karma 2001-12-15
  • 打赏
  • 举报
回复
according to MSDN (http://msdn.microsoft.com/library/en-us/ado270/htm/mdobjfield.asp):

Each Field object corresponds to a column in the Recordset. You use the Value property of Field objects to set or return data for the current record. Depending on the functionality the provider exposes, some collections, methods, or properties of a Field object may not be available.

With the collections, methods, and properties of a Field object, you can do the following:

Return the name of a field with the Name property.
View or change the data in the field with the Value property. Value is the default property of the Field object.
Return the basic characteristics of a field with the Type, Precision, and NumericScale properties.
Return the declared size of a field with the DefinedSize property.
Return the actual size of the data in a given field with the ActualSize property.
Determine what types of functionality are supported for a given field with the Attributes property and Properties collection.
Manipulate the values of fields containing long binary or long character data with the AppendChunk and GetChunk methods.
If the provider supports batch updates, resolve discrepancies in field values during batch updating with the OriginalValue and UnderlyingValue properties.
All of the metadata properties (Name, Type, DefinedSize, Precision, and NumericScale) are available before opening the Field object's Recordset. Setting them at that time is useful for dynamically constructing forms.

jsidiot 2001-12-15
  • 打赏
  • 举报
回复
还真的没有试过
相关推荐
发帖
MS-SQL Server

3.4w+

社区成员

MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
帖子事件
创建了帖子
2001-12-15 01:21
社区公告
暂无公告