oraperl problem: &ora_titles, &ora_types, &ora_lengths

From: Arthur Yasinski <ayasinsk_at_nofc.forestry.ca>
Date: 6 Feb 1995 22:33:17 GMT
Message-ID: <3h683d$itt_at_thor.nofc.forestry.ca>


I am encountering a weird anomaly with oraperl 2.004 and my Oracle v7.0.16 database. Normally, everything works fine, but some times, the three functions &ora_titles, &ora_types, and &ora_lengths neglect to return the first item.

For example, under SQL*Plus, I have the following table:

SQL> describe station

 Name                            Null?    Type
 ------------------------------- -------- ----
 NAME                                     CHAR(25)
 ID                                       CHAR(3)
 PROV                                     CHAR(12)
 FMR                                      CHAR(2)
 WXDATAHD                                 CHAR(10)
 PCPNDATAHD                               CHAR(10)
 OP_TIME                                  NUMBER(2)
 OP_RANGE                                 CHAR(5)
 SINONO                                   CHAR(5)
 TIMESRPD                                 CHAR(2)
 WHENRPD                                  CHAR(11)
 USETIMEPCP                               CHAR(2)
 TZ_CORRECT                               CHAR(5)
 MINSPSTHRR                               CHAR(4)
 USE                                      CHAR(2)
 USEPCPNID                                CHAR(3)
 PCPNCODE                                 NUMBER(2)
 AGENCY                                   CHAR(3)
 INT_ID                                   NUMBER(3)

However, if I execute the snipet of code below in oraperl, I get different results:

$query = "select * from station";
$csr = &ora_open($lda, $query ) || die;

_at_titles = &ora_titles( $csr, 0 );
(_at_lengths) = &ora_lengths( $csr );
(_at_types) = &ora_types( $csr );

$num_cols = scalar(_at_titles);

print "Titles: _at_titles \n";
print "Lengths: _at_lengths \n";
print "Types: _at_types \n";
print "Number of Cols: $num_cols \n";

This oraperl script returns:

Titles: ID PROV FMR WXDATAHD PCPNDATAHD OP_TIME OP_RANGE SINONO TIMESRPD WHENRPD USETIMEPCP TZ_CORRECT MINSPSTHRR USE USEPCPNID PCPNCODE AGENCY INT_ID Lengths: 0 3 12 2 10 10 40 5 5 2 11 2 5 4 2 3 40 3 40 Types: 0 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 2 Number of Cols: 19

If you notice, the first column (NAME) is missing from the titles, and has a length and type of 0.

Has anyone else seen this? or is it just me and my site? Are there any solutions or patches, or even work-arounds?

Thanks, in advance
Arthur


|       ARTHUR YASINSKI       | Dept. of Natural Resources Canada |
|       NWR Informatics       | CFS, Northern Forestry Centre     |
|-----------------------------| 5320-122 St.    Edmonton, Alberta |
|  My job is to come up with  | T6H 3S5     Phone: (403) 435-7352 |
|  solutions...not excuses!   | Email: ayasinski_at_nofc.forestry.ca |
 -----------------------------------------------------------------
Received on Mon Feb 06 1995 - 23:33:17 CET

Original text of this message