Rational ClearQuest Designer を使用してフィールドを作成するときに指定された、フィールドの最大長を戻します。この値は、列に許容されるバイト数に対応します。許容される実際の文字数は、データベース エンコード (つまり、文字セットと文字セット エンコード) とフィールド文字列内の文字によって異なります。
VBScript
entity.GetFieldMaxLength field_name
Perl
$entity->GetFieldMaxLength(field_name);
VBScript
' Check the maximum length of a string field. fieldType = GetFieldType("field1") If fieldType = AD_SHORT_STRING Then maxLength = GetFieldMaxLength("field1") End If
Perl
# Check the maximum length of a string field. $fieldtype = $entity->GetFieldType("field1"); if ($fieldtype eq $CQPerlExt::CQ_SHORT_STRING) { $maxlength = $entity->GetFieldMaxLength("field1"); }