GetMaxLength
Delivers the length of the longest entry in a given field.
This function can deal with any field type but it only makes sense for numeric and string types. Boolean, multistate, date and time values have a fixed length and so it does not really make sense to ask for their maximum length, but it is allowed.
Compatibility
Available as of IDEA version 10.0
Syntax
GetMaxLength(database as Variant, fieldName as String, minLength As Integer)
Parameters
database
Database name including the path(if needed). The file extension is not necessary. Alternatively the current database object can be provided.
fieldName
Name of the field to extract the maximum value from.
minLength
This function is optional and shall return the smallest value. If minLength is not set its default value is 0.
Return Value
Length of the longest numeric or string value of the given field or the length of a date, time, boolean or multistate field.
Remark
In case the underlying database is missing an exception shall be thrown. The same is valid in case the field does not exist.