Unless this is not an exact copy, there appears to be a bug in your
code.  You are missing a comma between "$packetCard" and "{ ORA_TYPE
=> ORA_RAW }", as well as in a few other places.

Adding that comma may fix it.  If not, I am not seeing any difference
in DBD::Oracle's handling between ORA_RAW and the default (VARCHAR2, I
think).  This means you may want to encode your string as pairs of hex
digits (as you have done in a later post) and maybe explicitly call
HEXTORAW() in your call to OSAQ_ENQUEUE()

On Tue, Aug 5, 2008 at 7:53 PM, Orcino, Joe <[EMAIL PROTECTED]> wrote:
> I am working with:
> Oracle relase 10.2.0.1.0,
> perl v 5.8.0,
> DBD::Oracle v1.21, and
> DBI 1.602. running on
> Red Hat Linux 2.4.21.
>
> I am trying to write to an Oracle Stored procedure defined as:
>
> CREATE OR REPLACE PROCEDURE JORCINO.osaq_enqueue(
>    ImmPacket_IN          RAW,
>    ImmPacketLen_IN       NUMBER,
>    ImmQSizeLimit_IN      NUMBER,
>    BufferedOpt_IN        NUMBER,
>    ImmEnqTimeMillis_OUT OUT NUMBER) AS ....
>
>
> In perl ...
>
>        #
>        # declare the PL/SQL stored procedure OSAQ_ENQUEUE
>        #
>        $osaq = $dbh->prepare(q{
>              BEGIN
>                   OSAQ_ENQUEUE(:ImmPacket,:ImmPacketLen,:ImmQSizeLimit,
>                                :BufferedOpt,:ImmEnqTimeMillis) ;
>              END;
>        });
>        if ( ! defined($osaq) ) {
>             die "Prepare error: ",$dbh->errstr, "\n" ;
>        }
> .
> .
> .
>             $osaq->bind_param(':ImmPacket', $packetCard
>                                { ORA_TYPE => ORA_RAW }) ;
>             $osaq->bind_param(':ImmPacketLen', length($packetCard)) ;
> # bind size
>             $osaq->bind_param(":ImmQSizeLimit", $OSAQ_SL
> # OSAQ_SIZE_LIMIT
>                                {ORA_TYPE => ORA_NUMBER});
>             $osaq->bind_param(":BufferedOpt", $OSAQ_Buf
> # OSAQ_Buffered
>                                {ORA_TYPE => ORA_NUMBER}) ;
>             $osaq->bind_param_inout(":ImmEnqTimeMillis", \$millis
> # immEnqMillis
>                                { ORA_TYPE => ORA_LONG }, SIZMILI) ;
>             $osaq->execute ;
> # packets sent via Oracle Streams Advance Queue
>
> For each execution (in a loop), I get no errors and the queue is
> incremented (indicating receipt of a record), but in the database, my
> binary :ImmPacket field is empty in the queue!
> I have made sure that the variable I am passing ($packetCard) does
> contain 207 bytes of binary information.  Our dequeue procedure is, of
> course, not working because the user data has nothing in it except the
> length field.  The Enqueue procedure is known to work via an application
> C++ process and the dequeue java process is also working.  The Perl
> program is a test tool I need to get working for QC load test purposes.
>
> I have searched all over the internet for someone who is doing something
> similar and I see no method better than what I am using.  Can anyone see
> something obvious that I am doing wrong?  Is this a known bug with
> DBD::Oracle?
>
> Any help would be appreciated.
>
> Thanks,
>
> Joe Orcino
>
> **************************************************************************************
> This e-mail is confidential, the property of NDS Ltd and intended for the 
> addressee only.  Any dissemination, copying or distribution of this message 
> or any attachments by anyone other than the intended recipient is strictly 
> prohibited.  If you have received this message in error, please immediately 
> notify the [EMAIL PROTECTED] and destroy the original message.  Messages sent 
> to and from NDS may be monitored.  NDS cannot guarantee any message delivery 
> method is secure or error-free.  Information could be intercepted, corrupted, 
> lost, destroyed, arrive late or incomplete, or contain viruses.  We do not 
> accept responsibility for any errors or omissions in this message and/or 
> attachment that arise as a result of transmission.  You should carry out your 
> own virus checks before opening any attachment.  Any views or opinions 
> presented are solely those of the author and do not necessarily represent 
> those of NDS.
>
> To protect the environment please do not print this e-mail unless necessary.
>
> NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West 
> Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England 
> and Wales  Registered no. 3080780   VAT no. GB 603 8808 40-00
> **************************************************************************************
>

Reply via email to