CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Delphi >  VCL组件开发及应用

如何知道某个字段里数据的字节数?

楼主jsp___3(没高手了吗)2002-02-27 09:48:46 在 Delphi / VCL组件开发及应用 提问

SELECT   len(model)   FROM   menus     这个可以查出字符数,但不是字节数,请高手指教? 问题点数:100、回复次数:11Top

1 楼robinson(鲁宾逊)回复于 2002-02-27 09:55:48 得分 10

应该是针对字段类型吧Top

2 楼jsp___3(没高手了吗)回复于 2002-02-27 10:17:19 得分 0

~upTop

3 楼xyzguan(不说)回复于 2002-02-27 10:43:44 得分 0

~upTop

4 楼zws()回复于 2002-02-27 10:46:03 得分 10

什么字段?  
  读出再判Top

5 楼jsp___3(没高手了吗)回复于 2002-02-27 10:49:44 得分 0

一定要有具体的类型才可以?Top

6 楼jsp___3(没高手了吗)回复于 2002-02-27 10:52:22 得分 0

一定要有具体的类型才能判断吗?Top

7 楼jsp___3(没高手了吗)回复于 2002-02-27 10:54:05 得分 0

一定要知道字段类型才能判断吗?Top

8 楼shinesi(DaBaiCai)回复于 2002-02-27 10:58:29 得分 30

在sql   server中有一个过程sp_columns可以得到Top

9 楼Carfield(一只特别懒的猫)回复于 2002-02-27 10:59:55 得分 10

UP,关注!Top

10 楼fontain()回复于 2002-02-27 11:08:55 得分 20

showmessage(inttostr(aa.fieldbyname('产品编号').size));  
   
   
  Indicates   the   size   used   in   the   definition   of   the   physical   database   field   for   data   types   that   support   different   sizes.  
   
  property   Size:   Integer;  
   
  Description  
   
  The   interpretation   of   Size   depends   on   the   data   type.   The   meaning   of   Size   for   different   data   types   is   given   in   the   following   table:  
   
  DataType Meaning   of   Size  
   
  ftBoolean Size   is   not   used;   its   value   is   always   0.  
  ftSmallInt Size   is   not   used;   its   value   is   always   0.  
  ftWord Size   is   not   used;   its   value   is   always   0.  
  ftAutoInc Size   is   not   used;   its   value   is   always   0.  
  ftDate Size   is   not   used;   its   value   is   always   0.  
  ftInteger Size   is   not   used;   its   value   is   always   0.  
  ftTime Size   is   not   used;   its   value   is   always   0.  
  ftCurrency Size   is   not   used;   its   value   is   always   0.  
  ftDateTime Size   is   not   used;   its   value   is   always   0.  
  ftFloat Size   is   not   used;   its   value   is   always   0.  
   
  ftBCD Size   is   the   number   of   digits   after   the   decimal   place.  
  ftString Size   is   the   maximum   number   of   characters   in   the   string.  
  ftVarBytes Size   is   the   maximum   number   of   bytes   of   data,   not   counting   the   first   two   bytes   which   indicate   the   actual   number   of   bytes   of   data   that   were   used.  
  ftBytes Size   is   the   maximum   number   of   bytes   of   data.  
  ftBlob Size   is   the   number   of   bytes   from   the   BLOB   that   are   stored   in   the   record   buffer.  
  ftDBaseOle Size   is   the   number   of   bytes   from   the   DBase   OLE   BLOB   that   are   stored   in   the   record   buffer.  
   
  ftFmtMemo Size   is   the   number   of   bytes   from   the   memo   that   are   stored   in   the   record   buffer.  
  ftGraphic Size   is   the   number   of   bytes   from   the   image   that   are   stored   in   the   record   buffer.  
  ftMemo Size   is   the   number   of   characters   from   the   memo   that   are   stored   in   the   record   buffer.  
  ftParadoxOle Size   is   the   number   of   bytes   from   the   Paradox   OLE   BLOB   that   are   stored   in   the   record   buffer.  
  ftTypedBinary Size   is   the   number   of   bytes   from   the   BLOB   that   are   stored   in   the   record   buffer.  
   
  ftUnknown Size   is   not   used;   its   value   is   always   0.  
  ftCursor Size   is   not   used;   its   value   is   always   0.  
  ftADT Size   is   the   total   number   of   fields   contained   in   the   ADT   field,   including   the   fields   of   any   fields   that   are   of   type   ADT.  
  ftArray  
  ftReference Size   is   not   used;   its   value   is   always   0.  
  ftDataSet Size   is   not   used;   its   value   is   always   0.Top

11 楼40Star(斯文、大方、有前途)回复于 2002-02-27 11:32:29 得分 20

如果是SqlServer的话,有系统表纪录着这些内容Top

相关问题

  • JDBC中如何将字节数组存入Oracle的LongRaw或Blob字段?
  • ADO+Access2000中的Blob字段最大字节数怎么设定呀
  • ADO+Access2000中的Blob字段最大字节数怎么设定呀
  • 成功发送n字节数据,是否一定能收到n字节数据?
  • 修改数据库中某个字段
  • 我使用SqlDataReader读数据库的image字段,用GetBytes()可是最后一个参数即读取的字节数,可是随图片大小不定,该怎么写啊?
  • 请问一下,我想统计一下数据库的可能容量,可不可以每个表字段占有的总的字节数乘以这个表的可能记录数,在说有的表求和?
  • 怎样取得socket缓冲区中数据的字节数?
  • 急求ADO Field AppendChunk插入大字节数据的例子。
  • 如果获得字节数据中的中文

关键词

  • value is always0
  • not used
  • size
  • data types

得分解答快速导航

  • 帖主:jsp___3
  • robinson
  • zws
  • shinesi
  • Carfield
  • fontain
  • 40Star

相关链接

  • Delphi类图书
  • Delphi类源码下载
  • Delphi控件下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo