|
Posted by final74 on 10/24/32 11:34
Hi
I'm experimenting with PHP5, ORacle 9i and ADODB and have run into
problems trying to bind and output variable.
I can make a successful connection to our database via the MSDAORA
provider but the following simple statement will not work:
$oCMD = new COM("ADODB.command");
$oCMD->ActiveConnection = $dbConn; /// $dbConn generated
earlier ...
$oCMD->Prepared = True;
$oCMD->CommandText = "SELECT 12345 INTO :num FROM dual";
$oCMD->Parameters->Append($oCMD->CreateParameter("num",adInteger,adParamOutput,5));
$oCMD->Execute();
$ans = $oCMD->Parameters->Item("num")->Value;
echo "answer: [$ans] <br />";
This generates the following : answer: []
I've tried binding via the '?' spaceholder as I've been told that
can be used as well but it fails with the following:
Fatal error: Uncaught exception 'com_exception' with message
'Source: Provider
Description: Unspecified error' ....
Can anyone advise as to what I may be doing wrong with the above?
Many thanks.
Navigation:
[Reply to this message]
|