Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to send multiple bind vars in perl DBI?

How to send multiple bind vars in perl DBI?

From: revjack <revjack_at_revjack.net>
Date: 30 Jun 2003 15:16:45 GMT
Message-ID: <bdpk8t$boh$1@news1.radix.net>


Hello,

I have a perl DBI script that connects to a remote machine and sends a single value to a stored procedure. The script reads the returned data just fine.

I have been informed that the remote stored procedure now requires three values instead of one. I'm pretty sure that I will need to change my execute() statement to pass a list instead of a scalar. Sending it a list now results in the "called with 3 bind variables when 1 are needed" error, which is not surprising.

What I don't know, is, how do I change the procedure call:

  STORED_PROC01(?); such that it accepts a list instead of a single value?

This is the essence of what I have, and it works with a single parameter:

#----------------------------------

$data = 'foo';
$sql = q(

BEGIN
  dbms_output.enable(1000000);
  STORED_PROC01(?);
END;
);
$dbh = DBI->connect(stuff);
$sth = $dbh->prepare($sql);
$sth->execute($data);
#----------------------------------

Now I need to start sending STORED_PROC01 lists like:

  'foo', 'bar', 'baz'
or
  NULL, NULL, '012345'
or
  'foo', NULL, NULL
etc.

Can anyone point me to a clue?

Thanks

-- 
___________________
revjack_at_revjack.net
Received on Mon Jun 30 2003 - 10:16:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US