Wrong syntax. 'EXECUTE' is a SQL*Plus command.
Correct syntax:
$sth->prepare(qq{
BEGIN
upd_lead_time;
END;
}) || die $DBI::errstr
-----------------
Ron Reidy
Senior DBA
Array BioPharma, Inc.
-----Original Message-----
From: Laurie Vien [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 11:02 AM
To: '[EMAIL PROTECTED]'
Subject: Syntax for executing a stored procedure?
I'm using DBI::ODBC. All I want to do is execute a stored procedure, but
the 3 lines below (which execute correctly under SQLplus) result in an
"invalid SQL statement" error. (My ODBC connection is set up to use the
Microsoft ODBC Driver for Oracle.) What would correct syntax be?:
$sql_stmt = "EXECUTE Upd_lead_time";
$sth = $dbh->prepare($sql_stmt);
$sth->execute();
Laurie A. Vien
Sr. Programmer/Analyst
Ben & Jerry's Homemade, Inc.
South Burlington, VT 05403
This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is intended
to be for the use of the individual or entity named above. If you are not the
intended recipient, please be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. Please notify the
sender of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.