Rational® ClearQuest® Designer를 사용하여 필드를 작성할 때 지정한 대로 필드의 최대 길이를 리턴합니다. 이 값은 열에서 허용되는 바이트 수에 해당합니다. 허용되는 실제 문자 수는 데이터베이스 인코딩(즉 문자 세트 및 문자 세트 인코딩)과 필드 문자열의 문자에 따라 다릅니다.
이 메소드는 유형이 SHORT_STRING인 필드에만 관련되어 있습니다.
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");
}