FYI DBD::Oracle 1.06 is over 4 years old.

Yes, was aware of that to my own frustration. Was able to work with sysadmin to get upt to 1.14 at least ... an advance of 2.5 years at least.




Please generate a trace file (level 4 should be detailed enough).


Here's the level 4 trace output, I focused the query (as you'll see below) to limit the output to one record. When I run the same query manually, it comes back with a 2. It appears blank here or if piped to a file will show up as "Seats - ^V"


DBI 1.42-nothread default trace level set to Ox4/0 (in pid 10822)
-> prepare for DBD::Oracle::db (DBI::db=HASH(0x187100)~0x104948 'select STS_ISS from umeg.UMEG_INSTR_TO_EVAL where trm='200408' and crs='HISP619' and sec='0101' and LAST_NAME LIKE 'Niev%'')
New DBI::st (for DBD::Oracle::st, parent=DBI::db=HASH(0x104948), id=)
dbih_setup_handle(DBI::st=HASH(0x104a38)=>DBI::st=HASH(0xf0a50), DBD::Oracle::st, 104a44, Null!)
dbih_make_com(DBI::db=HASH(0x104948), 17c260, DBD::Oracle::st, 208, 0) thr#0
dbd_st_prepare'd sql SELECT
dbd_describe SELECT (EXPLICIT, lb 80)...
fbh 1: 'STS_ISS' NULLable, otype 2-> 5, dbsize 22/134, p3.s0
dbd_describe'd 1 columns (row bytes: 22 max, 4 est avg, cache: 858)
<- prepare= DBI::st=HASH(0x104a38) at sisQuery.pl line 24
-> execute for DBD::Oracle::st (DBI::st=HASH(0x104a38)~0xf0a50)
dbd_st_execute SELECT (out0, lob0)...
dbd_st_execute SELECT returned (SUCCESS, rpc0, fn4, out0)
<- execute= '0E0' at sisQuery.pl line 25
-> fetchrow_hashref in DBD::_::st for DBD::Oracle::st (DBI::st=HASH(0x104a38)~0xf0a50)
1 -> FETCH for DBD::Oracle::st (DBI::st=HASH(0xf0a50)~INNER 'NAME')
1 <- FETCH= [ 'STS_ISS' ] at sisQuery.pl line 27
1 -> fetch for DBD::Oracle::st (DBI::st=HASH(0xf0a50)~INNER)
dbd_st_fetch 1 fields...
dbih_setup_fbav for 1 fields => 0x104bdc
dbd_st_fetch 1 fields SUCCESS
1 <- fetch= [ '.' ] row1 at sisQuery.pl line 27
<- fetchrow_hashref= HASH(0x24a858)1keys row1 at sisQuery.pl line 27
Seats -
-> fetchrow_hashref for DBD::Oracle::st (DBI::st=HASH(0x104a38)~0xf0a50)
1 <> FETCH= [ 'STS_ISS' ] ('NAME' from cache) at sisQuery.pl line 27
1 -> fetch for DBD::Oracle::st (DBI::st=HASH(0xf0a50)~INNER)
dbd_st_fetch 1 fields...
dbd_st_fetch no-more-data
1 <- fetch= undef row1 at sisQuery.pl line 27
<- fetchrow_hashref= undef row1 at sisQuery.pl line 27
-> finish for DBD::Oracle::st (DBI::st=HASH(0x104a38)~0xf0a50)
<- finish= 1 at sisQuery.pl line 43
-> disconnect for DBD::Oracle::db (DBI::db=HASH(0x187100)~0x104948)
<- disconnect= 1 at sisQuery.pl line 44
<> DESTROY ignored for outer handle DBI::db=HASH(0x187100) (inner DBI::db=HASH(0x104948) has ref cnt 3)
<> DESTROY ignored for outer handle DBI::st=HASH(0x104a38) (inner DBI::st=HASH(0xf0a50) has ref cnt 1)
-> DESTROY for DBD::Oracle::st (DBI::st=HASH(0xf0a50)~INNER)
<- DESTROY= undef
dbih_clearcom 0x104a38 (com 0x20a708, type 3) done.


    -> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x104948)~INNER)
    <- DESTROY= undef
    dbih_clearcom 0x187100 (com 0x17c260, type 2) done.

-- DBI::END
-> disconnect_all for DBD::Oracle::dr (DBI::dr=HASH(0x1b70dc)~0x218cec)
<- disconnect_all= (not implemented) at DBI.pm line 657 via sisQuery.pl line 0
! -> DESTROY for DBD::Oracle::dr (DBI::dr=HASH(0x218cec)~INNER)
! <- DESTROY= (not implemented) during global destruction
dbih_clearcom 0x1b70dc (com 0xfbcb8, type 1) done.


!   <> DESTROY for DBI::dr=HASH(0x1b70dc) ignored (inner handle gone)


Then post an *extract* that covers the prepare() call, the execute()
[that you've not shown], and a fetchrow_hashref call returning the
bad data.


I've tried a few more things, but have essentially reverted after no improvement. here's the code extract starting at the connection ..


my $dbh = DBI->connect('dbi:Oracle:' . $db, $username, $password) or die "can't connect";
die "Connect to $db failed \n" unless $dbh;
print "connected\n";


DBI->trace(4); # as requested

# made this more specific for debugging purposes
my $sql="select STS_ISS from umeg.UMEG_INSTR_TO_EVAL where trm='200408' and crs='HISP619' and sec='0101' and LAST_NAME LIKE 'Niev%'";
my $sth = $dbh->prepare($sql);
$sth->execute();


while ($row_ref = $sth->fetchrow_hashref()) { # this is the line 27 referenced in the trace above
# ... was pulling other values here, but since the query is focused, those are irrelevant for now
my $seats = $row_ref->{STS_ISS};


#print "First Name - $fName\nLast name - $lName\nTerm - $term\nCourse - $course\nSection - $section\nemail - $email\nType - ...";
print "Seats - $seats\n";
}


$sth->finish;
$dbh->disconnect;



Reply via email to