Most likely the problem is not your code, and most likley it is not DBI. Most likely, the problem is with the long field and ODBC.
I ran into a similar problem when I was using
Win32::ODBC and had to use the
SetMaxBufSize function
(see
www.roth.net/perl/odbc/docs/object/. I'm not sure of the DBI equivalent, but maybe this provides a clue. At worst, you could muck through the Win32::ODBC code and see what
SetMaxBufSize is actually passing to the ODBC layer.