[PHP-DEV] Strange behavior in OCI8 From: Albert Shahugian (a.shahugian <email protected>)
Date: 03/17/00

I have this named t1.php3:

<?
ociinternaldebug(1);
$user = "scott";
$pass ="tiger";
$db = "oracle";

$conn = OCILogon($user, $pass, $db);
if ($conn) {
    $sql = "select TTAB.currval from DUAL";
    $stmt = OCIParse($conn, $sql);
    if (OCIExecute($stmt)) {
        OCIFetchInto($stmt, &$row, OCI_BOTH);
        OCIFreeStatement($stmt);
        printf(">>> seq_id: %d<BR>\n", $row[0]);
    }
    OCILogOff($conn);
}
?>

It showing ORA-08002 in most cases.
Although reloading it about 20 times will show up this:

OCIDebug: oci8_do_connect: id=1
OCIDebug: oci8_parse "select TTAB.currval from DUAL" id=2 conn=1
OCIDebug: _oci8_free_stmt: id=2 last_query="select TTAB.currval from
DUAL"
>>> seq_id: 35
OCIDebug: _oci8_close_conn: id=1

It appears to be random when to showup this, but seq_id that is current
value of seqence!

I tried to reproduce this behavior trought sqlplus with no success.
My config is RH 6.1/PHP 3.013/Oracle 8.0.5

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>