Sounds like it doesn't like :1 :2 :3 for some reason.  What version of
DBD::Oracle are you using.  Try with ?, ?, ? instead and see if that works.

Ilya Sterin

-----Original Message-----
From: Loo, Peter # PHX [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 6:59 PM
To: 'Mark Vandenbroeck'; Loo, Peter # PHX
Cc: '[EMAIL PROTECTED]'
Subject: RE: Stored Procedure (arguments)



Mark,

I tried it with commas also and it gave me the same error message.  I tried
using the bind also and not successful.

Peter

-----Original Message-----
From: Mark Vandenbroeck [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 4:40 PM
To: Loo, Peter # PHX
Cc: '[EMAIL PROTECTED]'
Subject: Re: Stored Procedure (arguments)


Peter,

My guess is that you need comma's between the arguments of a
procedure/function
:

      $sth = $dbh->prepare("BEGIN $DICEpackage.DROP_INDEXES(:1:2:3); END;");

should be :

      $sth = $dbh->prepare("BEGIN $DICEpackage.DROP_INDEXES(:1, :2, :3);
END;");

Brgds,

Mark


"Loo, Peter # PHX" wrote:

>
> Hi All,
>
> Can someone please tell me what this is all about?
>
> DBD::Oracle::st execute failed: ORA-01036: illegal variable name/number
(DBD
> ERROR: OCIBindByName) at sma_run_aggs.pl line 172.
>
> Here is my syntax:
>
>     foreach $tableName (@tableList) {
>       print STDERR "\n\nDropping indexes (${tableName}).\n";
>       $sth = $dbh->prepare("BEGIN $DICEpackage.DROP_INDEXES(:1:2:3);
END;");
>       $sth->execute("${tableName}", "ALL", "FALSE"); <=== Line 172
>       sub_dbms_output_errors($SearchString, $dbh);
>       print STDERR "Truncating table (${tableName}).\n";
>       $sth = $dbh->prepare("BEGIN $DICEpackage.TRUNCATE_TABLE(:1:2);
END;");
>       $sth->execute("${tableName}", "ALL");
>       sub_dbms_output_errors($SearchString, $dbh);
>       }
>
> Thanks.
>
> Peter Loo

--
Mark Vandenbroeck                      Mobile : +32-495-59.55.62
EMEA Support Information Systems       Email  : [EMAIL PROTECTED]
                                       AIM    : markvdb

Reply via email to