note 45669 added to function.ora-bind
| From: | rudi22 at hotmail dot com | Date: | Tue, 14 Sep 2004 20:51:15 +0000 |
| Subject: | note 45669 added to function.ora-bind | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76688@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.ora-bind.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45669
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45669&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45669&report=yes
Search -- http://master.php.net/manage/user-notes.php