如何查字段长度?

werewolf1012 2003-10-29 06:28:30
我想要查找数据库中表的字段长度怎么查找,用程序!谢谢!!
...全文
41 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
juwuyi 2003-10-29
  • 打赏
  • 举报
回复
TField.DataSize

property DataSize: Integer;

Description

Check DataSize to determine the number of bytes required to store a field component抯 value. Use DataSize to determine the required size of a buffer for working with the field抯 value in native format. For example, use DataSize to determine the buffer size needed by the GetData and SetData methods.

The value of DataSize for TField is 0. Most descendants of TField override this property to specify the size required by the specific field type they represent. BLOB fields, however, represent data of indeterminate size. They do not override the inherited method, and the value of DataSize for BLOB fields is 0. A value of zero should not be interpreted as meaning the field value requires no memory. A value of zero indicates that the memory required for the field is indeterminate.
lovercy 2003-10-29
  • 打赏
  • 举报
回复
我也看错了!
Dlwxn 2003-10-29
  • 打赏
  • 举报
回复
我看错了。
kuan 2003-10-29
  • 打赏
  • 举报
回复
ADOQuery1.Fields.FieldByName(XXX').DataSize
是Integer类型的。
Dlwxn 2003-10-29
  • 打赏
  • 举报
回复
Canvas.TextWidth('Hello!');

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧