Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> ORA-22285 error message
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
![]() |
![]() |