我想要查找数据库中表的字段长度怎么查找,用程序!谢谢!!

解决方案 »

  1.   

    ADOQuery1.Fields.FieldByName(XXX').DataSize
    是Integer类型的。
      

  2.   

    TField.DataSizeproperty DataSize: Integer;DescriptionCheck 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.