Ilya,
Here it is:
# $Id: Oracle.pm,v 1.76 1999/06/14 00:41:48 timbo Exp $
#
# Copyright (c) 1994,1995,1996,1997,1998,1999 Tim Bunce
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file,
# with the exception that it cannot be placed on a CD-ROM or similar media
# for commercial distribution without the prior approval of the author.
require 5.003;
$DBD::Oracle::VERSION = '1.02';
my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
Peter
-----Original Message-----
From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 5:38 PM
To: Loo, Peter # PHX; 'Mark Vandenbroeck'
Cc: [EMAIL PROTECTED]
Subject: RE: Stored Procedure (arguments)
Forgot how to do the easy way, but just print out the
$DBD::Oracle::VERSION
Did it work with '?' instead of ':1'
Ilya Sterin
-----Original Message-----
From: Loo, Peter # PHX [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:27 PM
To: 'Sterin, Ilya'; Loo, Peter # PHX; 'Mark Vandenbroeck'
Cc: [EMAIL PROTECTED]
Subject: RE: Stored Procedure (arguments)
How do you check for a correct version? I am seeing all sort of information
with different values.
-----Original Message-----
From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 5:14 PM
To: Loo, Peter # PHX; 'Mark Vandenbroeck'
Cc: [EMAIL PROTECTED]
Subject: RE: Stored Procedure (arguments)
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