简体   繁体   English

Delphi 5-TField上的大小不匹配

[英]Delphi 5 - size mismatch on TField

On an ADOQuery I've created a String Tfield and set the it's size to 24(from Fields Editor). 在ADOQuery上,我创建了一个String Tfield并将其大小设置为24(来自Fields Editor)。

When I'm trying to assign to this field a 24 characters length string (qry.fieldbyname('fieldname').asString ), only first 20 characters are added. 当我尝试为该字段分配一个24个字符长的字符串(qry.fieldbyname('fieldname').asString )时,仅添加前20个字符。 I don't understand why. 我不明白为什么。

How is the query populated with data? 查询中如何填充数据? If you are doing a select against a table then the column will have the same width as in the table schema. 如果要对表进行选择,则该列的宽度将与表模式中的宽度相同。 Check how the column is defined in your database. 检查列在数据库中的定义方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM