Topic
  • 2 replies
  • Latest Post - ‏2008-01-23T21:01:41Z by SystemAdmin
SystemAdmin
SystemAdmin
262 Posts

Pinned topic unixODBC 2.2.12 and iSeriesAccess-5.4.0-1.4.x86_64.rpm and perlODBC

‏2007-12-10T17:26:27Z |
I have a server running x86_64 CentOS 5 (redhat EL5 clone).
I installed unixODBC 2.2.12, iSeriesAccess-5.4.0-1.4.x86_64.rpm and perl ODBC.

I get the following error:
as400@admin-db as400_updaters$ ./tester all
DBD::ODBC::st fetchrow_hashref failed: unixODBCIBMiSeries Access ODBC DriverColumn 3: CWB0111 - A buffer passed to a system call is too small to hold return data (SQL-22018)
unixODBCIBMiSeries Access ODBC DriverColumn 3: CWB0111 - A buffer passed to a system call is too small to hold return data (SQL-22018)
unixODBCIBMiSeries Access ODBC DriverString data right truncation. (SQL-01004)(DBD: st_fetch/SQLFetch (long truncated DBI attribute LongTruncOk not set and/or LongReadLen too small) err=-1) at /data/as400/as400/bin/as400_updaters/x_constants.pl line 35.

on another server running i386 CentOS 4.5 (redhat el4 clone) and
iSeriesAccess-5.2.0-1.8.i386.rpm
this same script had no problems.

any ideas on how to fix this?

Message was edited by: mikem_cabler
Updated on 2008-01-23T21:01:41Z at 2008-01-23T21:01:41Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: unixODBC 2.2.12 and iSeriesAccess-5.4.0-1.4.x86_64.rpm and perlODBC

    ‏2008-01-22T15:53:52Z  
    Hi
    could you tell me what datatype is your buffer in you aplication and your field in your table?

    That error happens, for example, when you are holding a value of "ABCDEF" returned by the query in a variable as: mybuffer char[3];

    Because mybuffer is smaller than the size of the field.

    Regards
  • SystemAdmin
    SystemAdmin
    262 Posts

    Re: unixODBC 2.2.12 and iSeriesAccess-5.4.0-1.4.x86_64.rpm and perlODBC

    ‏2008-01-23T21:01:41Z  
    I don't think his issue is because of the buffer in his application since he is using PERL, so he does not specify the size of the buffer. However the PERL extension should be responsible for detect the size in the database and allocate enough memory. May be you are using a buggy perl extension or you are using it improperly?