Determines the default length of fields that are mapped as VARCHAR.
Valid Values
length | multiplier
where:
length
is the default length in characters given to columns that are discovered and mapped as VARCHAR.
multiplier
is a positive number immediately followed by the character x. For example, 3x. The positive integer is multiplied by the size of the largest object detected in a column to determine the default VARCHAR length for that column.
The value for this option is specified as a key=value pair in the Config Options field. See "Config Options" for details.
Behavior
If set to length, the value specified is the default length in characters for the all fields that are discovered and mapped as VARCHAR. Values that exceed the specified default length are truncated when selected via the driver.
If set to multiplier, the default length for a VARCHAR column is defined by multiplying the multiplier value by the size, in characters, of the largest value detected in that column. Values that exceed the default length defined for the column are truncated when selected via the driver.
Note: When specifying a multiplier, you can define the maximum and minimum limits of the default length generated with the MaxVarcharSize and MinVarcharSize config options.
Example
For character values:
When DefaultVarcharSize is set to 2000 and the largest detected field in a column is less than or equal to 2000 characters, String is mapped as VARCHAR and the precision is 2000 characters. When a VARCHAR field with a size greater than 2000 characters is discovered, the driver truncates the value to 2000 characters.
For multiplier values:
When DefaultVarcharSize is set to 1.5x and the largest detected field in a column is 2000 characters, the default length of fields mapped to VARCHAR is determined by multiplying 1.5 by 2000, which results in a default length of 3000 characters. When a value in that column exceeds 3000 characters, the driver truncates the value to 3000 characters.
Notes
We recommend specifying a multiplier value for this option. Specifying a multiplier can improve memory efficiency within the driver and the ODBC application by having the length for every VARCHAR column proportionate to the size of the data for a given column.
When a column with a String size greater than 4000 is discovered, the column is mapped as LONGVARCHAR and precision is 16 MB.
The default length of fields for columns mapped as VARCHAR can be overridden using the Schema Tool. See "About Column Information and Statistics" for details.
DefaultVarcharSize is not applied to columns that contain only ObjectIDs. Columns that contain only ObjectIDs are mapped as VARCHAR.
Default
1.5x
GUI Tab
For Windows:
The value for config options are specified in the Config Options field on the Advanced tab.
For UNIX/Linux:
The value for config options are specified in the Config Options field on the Schema Tool. For details, see "Starting the Schema Tool on UNIX/Linux."