Hi Bruce,

Can you more fully explain your rationale? It sounds like an interesting
idea, but that's the first i've heard of it. 

Thanks,

Mark.

-----Original Message-----
From: Powell, Bruce [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 11:26 AM
To: 'Scott T. Hildreth'; Powell, Bruce
Cc: [EMAIL PROTECTED]
Subject: RE: Multiple IN variables for Oracle Procedure


Yes, I did test it first with a simple insert statement.  The reason I am
using a procedure is speed.  I can pin the procedure in memory and save time
on multiple inserts.

-----Original Message-----
From: Scott T. Hildreth [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 09:19 AM
To: Powell, Bruce
Cc: [EMAIL PROTECTED]
Subject: RE: Multiple IN variables for Oracle Procedure



Have you tried running it from the command line, not as a CGI script?
This may be an example, but you really don't need a stored procedure here.
 
$sth = $dbh->prepare('insert into some table values(?,?)');
$sth->execute($data1, $data2).

....but your procedure may do alot more than you sent here.

On 13-Jun-2002 Powell, Bruce wrote:
> I am currently having an issue with sending multiple variables to a Oracle
> procedure.  When I do this the CGI script I am using reports that the
script
> has run successfully.  But when I check the database it only received the
> first variable.
> 
> Example:
> 
> If my procedure looks like this:
> 
> create or replace procedure foo
>       (v_some_data    IN      some_table.some_column%TYPE,
>        v_some_data2   IN      some_table.another _column%TYPE)
> as
> begin
>       insert into some_table
>       values(v_some_data, v_some_data2);
> end;
> /
> 
> and I evoke the command by the following:
> 
> my $dbh = DBI->connect("dbi:Oracle:$srvc", $user, $passwd,
>         { AutoCommit=>0, RaiseError=>1 } )
>     or die "connect problem: $DBI::errstr";
> 
> $sth = $dbh->prepare(qq{
>               BEGIN
>                       FOO(:some_data, :some_data2);
>               END;
>           });
> $sth->bind_param(":some_data", $some_data);
> $sth->bind_param(":some_data2", $some_data2);
> $sth->execute;
> 
> $dbh->disconnect();
> exit (0);
> 
> I am using DBD::Oracle-1.12 and DBI 1.21.  Any help would be appreciated.
> 
> -Bruce Powell
>  
>  
>  
>
___________________________________________________________________________
> CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is

> for the sole use of the intended recipient(s) and may contain confidential

> and privileged information.  Any unauthorized review, use, disclosure or 
> distribution is prohibited.  If you are not the intended recipient, please

> contact the sender by reply e-mail and destroy all copies of the original 
> message.

----------------------------------
E-Mail: Scott T. Hildreth <[EMAIL PROTECTED]>
Date: 14-Jun-2002
Time: 10:14:21
----------------------------------
 
 
 
___________________________________________________________________________
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is 
for the sole use of the intended recipient(s) and may contain confidential 
and privileged information.  Any unauthorized review, use, disclosure or 
distribution is prohibited.  If you are not the intended recipient, please 
contact the sender by reply e-mail and destroy all copies of the original 
message.


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of 
Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, 
proprietary copyrighted and/or legally privileged, and is intended solely for the use 
of the individual or entity named in this message.  If you are not the intended 
recipient, and have received this message in error, please immediately return this by 
e-mail and then delete it.

==============================================================================

Reply via email to