Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ORA-22285 error message

ORA-22285 error message

From: Dimitri Pissarenko <Dimitri.Pissarenko_at_braintrust.at>
Date: Fri, 23 Jul 1999 14:25:53 +0200
Message-ID: <37985F51.40ACB2FD@braintrust.at>


I have a problem with the ORA-22285 error message:

I inserted a row to an Oracle 8 database using the following statement:

     INSERT INTO test3(id, datei) VALUES (11, BFILENAME('img','test1.gif'))

The field "datei" is of type BFILE (external LOB type). The file "test1.gif" is in the c:\-directory of the computer where the query is executed from.

The directory object "img" was previously created using the following create statement:

    CREATE OR REPLACE DIRECOTORY img AS "C:\"

Afterwards, I tried to read the BFILE field using following SQL statement

     SELECT datei FROM test3

I got following error message

     Warning: OCILobGetLength: ORA-22285: Directory or file for GETLENGTH-Process doesn't exist

The SELECT statement were executed from following PHP script:

<html>
<?
$db = "bt";
$conn = ocilogon("system","manager",$db);

$query = "SELECT datei FROM test3";
$stmt = ociparse($conn, $query);
ociexecute($stmt, OCI_DEFAULT);
while (ocifetchinto($stmt, &$arr, OCI_ASSOC + OCI_RETURN_LOBS )) {
 $lob = $arr["datei"];
 echo "File: ", $lob, "<br>\n";
}

ocifreestatement($stmt);

OCILogOff($conn);
?>

</html>

Can anyone tell me how this error can be corrected?

Thanks,
Dimitri PISSARENKO Received on Fri Jul 23 1999 - 07:25:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US