Easysoft
ODBC Drivers for Oracle, SQL Server, Firebird, ISAM, InterBase, Sybase, MS Access & more.

Easysoft Data Access

Why do I get error "Can't change param 1 maxlen (51->50) after first bind" when running make test in DBD::ODBC?

Article : 00955
Last Reviewed : 9th February 2007
Revision : 2

This applies to DBD::ODBC 1.14 (and earlier versions) and Perl 5.8.8 and later versions. It may apply to versions of DBD::ODBC later than 1.14 is our patch for the fix is not implemented by the maintainer (see the DBD::ODBC changes file).

Perl's internal SvGROW function changed in Perl 5.8.8 so that it grows a scalar up to the next longword boundary instead of up to the size specified in the SvGROW call (although they can obviously be the same).

This affects DBD::ODBC which uses SvGROW to grow a scalar because it tests the length the scalar is grown to against the length it asked for and produces the error:

Can't change param 1 maxlen (51->50) after first bind 
at t/20sqlserver.t line 180

if the scalar is not equal to what was requested.

The solution is a simple change to the dbdimp.c module. Look for the line:

else if (maxlen && maxlen != phs->maxlen) {

at around line 2931 and change it to:

else if (maxlen && maxlen > phs->maxlen) {

Applies To

Knowledge Base Feedback

* Did this content help you?
Yes
No
Maybe
 
* Please select one option based on your first choice:
I'm very satisfied
I think it will help, but I haven't tried it yet
It is helpful, but I need more information
It is helpful, but hard to understand
Seemed relevant in search results, but didn't help me
The information is incorrect
The page contains one or more broken links
 
  Suggest new content or let us know how we can improve this content:

 
  (* Required Fields)   



© 1993 - 2008 Easysoft Limited. All rights reserved.