depends on the DBD::Driver implimentation.
In DBD::Oracle the maxlenth usually means nothing. Not sure about other
drivers.
which one are you using?
In your case it should never matter as your are reruning a scalar number the
maxlength usualy comes into play when you are returning things like
$sth->bind_param_inout(":mytable", \...@arr, 10, {
ora_type => ORA_VARCHAR2_TABLE,
ora_maxarray_numentries => 100
} ) ;
in the case above you are returing an actual table so you may want to make some
room for it.
so to answser your quesestion it is used to tell the DB how much memory to use.
As you are just getting a number you can just ingnore it
hope this helps
> From: [email protected]
> To: [email protected]
> Subject: DBI bind_param_inout question
> Date: Mon, 8 Mar 2010 15:14:24 -0700
>
> The syntax is $csr->bind_param_inout(':var',\$perlvar,$maxlength)
>
> My question is what is $maxlength in relation to the database.
>
> If my statement is returning a number (a sequence value) how big do I
> need it to be?
>
> My sql is
>
> insert into reservedroom (id, requesttime, roomid, day, purpose,
> reserver,email, affil,requesterpid)
> values
> (reservedid
> .nextval,sysdate,:roomid,:theday,:purp,:reserve,:remail,:affil,:pid)
> returning id into :newrez"
>
> and the bind_param_inout parameter is :newrez.
>
> This value will never get higher than 999,999,999 (the database has
> been running for 6 or 7 years now and currval = 127,616).
>
> --
> Bruce Johnson
> University of Arizona
> College of Pharmacy
> Information Technology Group
>
> Institutions do not have opinions, merely customs
>
>
_________________________________________________________________
Stay in touch.
http://go.microsoft.com/?linkid=9712959