On Mon, Apr 26, 2004 at 10:34:15AM -0600, Ralph E. Reschke, Jr. wrote:
>    Tim,
> 
>    Thanks very much for getting back.  Here's a snippet of my code - basically 
> copied right out of the
>    documentation:
> 
>    ...
>    for($i=1; $i <= (($FldsLeft > 100)?100:$FldsLeft); $i++)
>    {
>        $sth->bind_param_array($i,$BindArrays[$i - 1]);
>    }
>    $DBIret = $sth->execute_array({ ArrayTupleStatus => \my @my_tuple_status });
>    if(!defined($DBIret)) {
>    ...
> 
>    $DBIret does come back as not defined, as expected, but I never see anything 
> populated in the
>    "my_tuple_status" array.
> 
>    Thanks for any input you may have!

I don't have any. The DBI test suite does:

        my $tuple_status = [];
        ...
        ok( $sth->bind_param_array(4, [ qw(a b c) ]) );
        ok( $sth->execute_array({ ArrayTupleStatus => $tuple_status }) );
        ok( @$rows, 3 );
        ok( @$tuple_status, 3 );
        $dumped = Dumper($rows);
        ok( $dumped, "[[1,42,undef,'a'],[2,42,undef,'b'],[3,42,undef,'c']]");
        $dumped = Dumper($tuple_status);
        ok( $dumped, "[1,1,1]");

so the logic in the DBI should be working fine. And DBD::Informix
doesn't override the methods.

So now it's down to you to do some good old fashioned debugging...

Tim.


>  --
>  Ralph
>  Office:  B2-D19
>  303-538-2161 (work)
>  303-425-9995 (home)
>  [EMAIL PROTECTED]
> 
>    Tim Bunce wrote:
> 
>  On Fri, Apr 23, 2004 at 04:04:45PM -0600, Ralph E. Reschke, Jr. wrote:
>   
> 
>  To anyone that may have some knowledge about this:
> 
>  I'm using the DBI functions "bind_param_array" and "execute_array" to
>  bulk insert some records into an Informix database.  When calling
>  "execute_array", I'm using the parameter "{ ArrayTupleStatus =>
>  @tuple_status }".  Whenever there is a problem loading a tuple into the
>  database (invalid field type, duplicate row, etc.), I don't ever get
>  anything populated in the "@tuple_status" array.
> 
>  Has anyone encountered this problem before?  If so, does anyone know how
>  to get any failure information on the tuple that fails?  Thanks!
>     
> 
>  I suspect you're not passing the correct attribute and value.
>  (For example, you need to pass an array _reference_, unlike above.)
>  Please show the relevant chunk of code.
> 
>  Tim.
>   

Reply via email to