Name

LongTruncOk ( boolean, inherited)

Synopsis

This attribute may be used to control the effect of fetching a long field value that has been truncated (typically because it’s longer than the value of the LongReadLen attribute).

By default, LongTruncOk is false, and so fetching a long value that needs to be truncated will cause the fetch to fail. (Applications should always be sure to check for errors after a fetch loop in case an error, such as a divide by zero or long field truncation, caused the fetch to terminate prematurely.)

If a fetch fails due to a long field truncation when LongTruncOk is false, many drivers will allow you to continue fetching further rows.

See also LongReadLen.

Get Programming the Perl DBI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.