To add more info, I was told this problem only occurs if there is only
one row returned.  If more than one row is returned, the arrayref is 
fine.  I changed the selectall_arrayref to selectrow_array and the data
(one row returned) was fine.   I'm posting to dev as well, just in case 
this is a known bug.   I copied the table to a 9i instance and the ran
the code below, and it worked fine.  So it seems to be related to 10g.


Thu, 2005-10-20 at 14:07 -0500, Scott T. Hildreth wrote:
> I am going to investigate more, but I thought I would post the question
> to see if anyone has run into this problem.
> 
> I have co-workers that connecting to a remote Oracle DB (10.1), I
> compiled DBD::Oracle 1.16 with the 10.1 client libraries.  The data
> returned from a selectall_arrayref is 2 fields a filename and a
> quantity.  Here is the isolated code,
> 
> 286:            my $load_file_ar = $dbh->selectall_arrayref(q{
> 287                     select FILENAME, NUM_RECORDS
> 288                       from LOAD_DATA_SRC_FILE
> 289                      where LOAD_ID = ?
> 290                        and DATA_UPDATE_ID = ?
> 291                      order by FILE_ID
> 292             }, undef, $load_id, $update_id);
> 
> $load_id = 19 & $update_id = 51.
> 
> ...here is the data returned.
> 
>   DB<4> x $files_ar
> 0  ARRAY(0x8536328)
>    0  ARRAY(0x85e40e0)
>       0  (binary data)
>       1  51
> 
> what ever $update_id's value is, this is always returned in the [1] position
> of the the arrayref and the filename is always binary data.  This works fine
> with sqlplus.  
> 
> I have tried it with Perl 5.8.[167] always the same results.   The database 
> resides on an Alpha and the clients are on Linux.  Trace doesn't show anything
> unusual.  I don't know if this is an NLS-utf8 issue.  Any ideas?
> 
>                                 Thanks,
>                                      STH
>  
> Trace- level 9 is attached.
> 
-- 
Scott T. Hildreth <[EMAIL PROTECTED]>

Reply via email to