Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Unanswered: Problem with Bfile

    Hello experts,
    i have a big problem with the BFILE. I would like to insert into an Oracle DB an image, with BFILE Field.
    I'm programming with JAVA and i wrote this lines:

    query="INSERT INTO TestBFile VALUES (seqBFileId.NextVal,BFileName('c:\\JPG\\','BFile.j pg'))";
    stmt.executeQuery(query);

    The problem is that I have an Exception:

    ORA-22285: non-existent directory or file for GETLENGTH operation

    What is the problem? I read that i have to put a Directory on the Server, but i don't know the path and the Server File System. What I could do to resolve my problem?
    Please help me. Thank you so much... Have a nice day
    Gianni

  2. #2
    Join Date
    Feb 2004
    Location
    India
    Posts
    22
    Check the following things
    1. Have you created Directory JPG folder in C drive?
    2. Have you created Directory JPG in Oracle?
    CREATE OR REPLACE DIRECTORY JPG AS 'C:\\JPG');

    3. If u have not done the above two steps, do that and write this code

    query="INSERT INTO TestBFile VALUES (seqBFileId.NextVal,BFileName('JPG','BFile.jpg'))" ;

    Hope this will solve your problem
    Regards,
    Jigar Bhavsar

  3. #3
    Join Date
    Mar 2004
    Posts
    2
    Hi, and thak you for your reply.
    I answer at your point.
    1. i already have a directory in C. The path is c:\JPG. The problem is that i have to put \\ into the path, because i work from java code.
    2. I don't understand the question : JPG in ORACLE. I don' have a JPG in oracle but only a directory under c:\ (==> c:\JPG).
    3. I tried your code, but i have at the same problem.

    I don't know the cause of my problem :-(

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •