note 45669 deleted from function.ora-bind by tularis
| From: | tularis@php.net | Date: | Tue, 14 Sep 2004 21:04:13 +0000 |
| Subject: | note 45669 deleted from function.ora-bind by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76690@lists.php.net to get a copy of this message | ||
Note Submitter: rudi22 at hotmail dot com
----
Hi Everyone,
I tried the following code based on Ahmed notes to call to an oracle procedure:
$sql = "begin p_ins_gsdata2 '$requestid', :returnval);
end;";
$cur = ora_open($this->conn);
// Parse the SQL Call
$rc = ora_parse($cur, $sql, 0);
if ($rc == true) {
echo " Parse was successful ";
}
$rc3 = ora_bind ($cur, "returnval", ":returnval", 10, 2);
if ($rc3 == true) echo " Returnval Bind Successful ";
$returnval = "a";
$rc2 = ora_exec($cur);
if ($rc2 == true) {
echo " Exec was successful ";
echo " Return Value = ".$returnval;
ora_commit($this->conn);
}
if ($rc2 == false) {
echo " Error = ".ora_error($cur);
echo " ";
echo "ErrorCode = ".ora_errorcode($cur);
$message = "The records were Not copied successfully -
Exec";
echo $message;
}
ora_close ($cur);
I get:
Parse was successful Returnval Bind Successful Error = ORA-00000: normal, successful completion --
while processing OCI function OBNDRA ErrorCode = 0The records were Not copied successfully - Exec
Even though it parses, it doesn't execute. This leads me to believe that either there's
something else going on, or the note posted above has code that doesn't quite work.
Regards,
R.