hi all,
I use to get an error while retrieving data from oracle databse.

Warning: ociparse(): supplied argument is not a valid OCI8-Connection resource in
Warning: ociexecute(): supplied argument is not a valid OCI8-Statement resource in
Warning: ocirowcount(): supplied argument is not a valid OCI8-Statement resource in
Warning: ocifetch (): supplied argument is not a valid OCI8-Statement resource in

In the mean time I’m not getting any error but its not retrieving the data.

Part of my script:

<?php
$iDBConn = ocilogon("TIGER", "SCOT", "ORACLDB"); $qGetEmployees = "SELECT STAFF_ENNAME FROM HR_STAFF_MAST";

$iStatement = @OCIParse($iDBConn, $qGetEmployees);
@OCIExecute($iStatement, OCI_DEFAULT);
// check our query

$arrError = OCIError($iStatement);
if ($arrError['code'])
{
print $arrError['message'];
exit;
}
while (OCIFetch($iStatement) ) {
echo"<tr>";
if(!empty($iStatement))
{
$result=OCIResult($iStatement, "STAFF_ENNAME");{
?>

Please help
thanks
hass_79

    hi!

    here is where it fails:

    $iDBConn = ocilogon("TIGER", "SCOT", "ORACLDB");

    you must have some kind of error here. wrong access data? wrong parameter order(!)? wrong function name?

    (in php.net I only find "$c1 = oci_connect("scott", "tiger", $db);" ... but there seems to have changed a lot.)

    perhaps the oracle db is secured against access from outside? afaik, you can restrict access to certain IPs.

    hope this is useful

      Write a Reply...