Insert an image in lob, but - error...

Hello everyone, I am trying to insert an image of local computer in the DB. But seems that it is not working. Here's what I did. I create a directory, a temporary table and a procedure (all tests). Here's the code. I'm on 9.2.0.5
CREATE OR REPLACE DIRECTORY 
IMAGE_DIR AS 
'C:\image_dir';

CREATE TABLE SYSTEM.TEMP_IMAGE
(
  ID          NUMBER,
  IMAGE_NAME  VARCHAR2(50 BYTE),
  IMAGE       BLOB
);

CREATE OR REPLACE PROCEDURE SYSTEM.insert_image_file (p_id NUMBER, p_image_name IN VARCHAR2)
IS
   src_file   BFILE;
   dst_file   BLOB;
   lgh_file   BINARY_INTEGER;
BEGIN
   src_file := BFILENAME ('IMAGE_DIR', p_image_name);
 
   -- insert a NULL record to lock
   INSERT INTO temp_image
               (ID, image_name, image
               )
        VALUES (p_id, p_image_name, EMPTY_BLOB ()
               )
     RETURNING image
          INTO dst_file;
 
   -- lock record
   SELECT     image
         INTO dst_file
         FROM temp_image
        WHERE ID = p_id AND image_name = p_image_name
   FOR UPDATE;
 
   -- open the file
   DBMS_LOB.fileopen (src_file, DBMS_LOB.file_readonly);
   -- determine length
   lgh_file := DBMS_LOB.getlength (src_file);
   -- read the file
   DBMS_LOB.loadfromfile (dst_file, src_file, lgh_file);
 
   -- update the blob field
   UPDATE temp_image
      SET image = dst_file
    WHERE ID = p_id AND image_name = p_image_name;
 
   -- close file
   DBMS_LOB.fileclose (src_file);
END insert_image_file;
/
But when I try to insert the image, his throws below error...
my image test.jpg sits in this directory (where I created a directory). 'C:\image_dir ';

so, how can I make oracle look my local dir?

BEGIN insert_image_file(3,'test.jpg'); END;

Error on line 1
ORA-22288: file or LOB FILEOPEN operation failed
No such file or directory
ORA-06512: at "SYS." DBMS_LOB", line 504
ORA-06512: at "SYSTEM. INSERT_IMAGE_FILE', line 26
ORA-06512: at line 1

But I want this to work with the image (or directory) local to the client machine?

DB server knows NOTHING about the client system

UTL_FILE_DIR MUST be local to the DB server!

I don't make the rules.
I'm just telling you how Oracle performs!

Tags: Database

Similar Questions

  • Error 6 - impossible to insert an image in an e-mail

    Can no longer insert an image into an email in Outlook Express 6, or Outlook 2003
    Win XP Pro SP3 with a lot of RAM.

    I'm writing a new email in Outlook or OE6
    I insert - image.
    I get a small window asking me the path of the folder where are my pictures.  It has a button 'Browse '.  When I hit the Browse button, I get the error message
    Message from Web page
    An error has occurred in this dialog box.
    Error: 6
    Object does not support this property or method.
    [Button].
    If, instead of hitting the Browse button, I type in the path to the folder my pictures and press OK, it puts a little white-box-with-red-X in the e-mail.
    Before, when I hit browse, it allows to open the folder my pictures, I would select a gif, click OK and the gif to dance around in the body of my email.  More.
    Make me sad.

    Also, when I am in the folder my pictures and allows you to send. Recipient of the message, it adds the image as an attachment to the email, not IN the email.  No pleasure.  I miss my dancing bananas in emails to my wife.

    Any ideas what to do?  Thank you.

    I could try to reinstall IE8 and see if solve you the problem by doing this.  You don't indicate that IE8 has caused the problem, so install it again, but disable or AVAST edition so it does not interfere with the IE8 install first.  Then, go to Windows Update and then see if things are fixed.

    Steve

  • I try to insert two images in a single document, group them, and then export it to a jpg file but cannot do so can you please help. Thank you

    I try to insert two images in a single document, group them, and then export it to a jpg file but cannot do

    Hello sara,.

    For my part, I prefer to use my German PS in this way (I try to translate the commands):

    Use the same height for both images.

    Open the first image in PS.

    Use Bild > Arbeitsflache (Image > work plan?) See screenshot:

    From there:

    Give him the new with, by clicking on the left or the right indicating the hand playing around (trial and error).

    Now you can insert your second image.

    Hans-Günter

  • When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036

    Error image system original title: windows 7 0 x 81000036

    I'm doing a backup system image.  When I select this option I get the dialog box 'Create image s system' but it cannot find any 'backup devices on this computer"and lists the error 0 x 81000036.

    I have an ESATA connection on my Dell laptop I was trying to make the image on.  I use the unit every day to save files and which works very well.  He just leaves me CCADE with the system image backup...

    any ideas?

    Hello

    ·         You have created a system image backup before that?

    ·         You did it changes on your computer?

    ·         Is your esata formatted NTFS drive?

    Try to save the image of the boot system: http://support.microsoft.com/kb/929135

    Note: make sure that you start the computer in normal mode after a repair.

    See also the linkfor more information about the backup: http://windows.microsoft.com/en-US/windows7/Back-up-your-programs-system-settings-and-files

  • How to insert an image in a XY Chart

    Hi all, I'm trying to insert an image in a certain position in a XY Chart. When I use the image properties plot in that he always set the top position to the left of the graphic indicator XY, but I can not resolve to put him at the center of the graph XY. I've attached an example try (you can use any small table you have). Thanks in advance.

    Thank you very much, it works very well!

  • How to insert an image in Wordpad?

    Anyone have any suggestions on how to insert an image in Wordpad?

    Thanks in advance for your suggestions

    Hello

    I don't think we can save images in formats RTF...

    What you can do is insert an object (file select Jpg) and fix it with the RTF (Wordpad) documents. Correct me if I'm wrong...

    * I tried to open the RTF (Wordpad files) daughter in MS Word and insert an image, it will save, but not from Wordpad.

    I hope this helps.

  • BlackBerry Smartphones to insert an image in the message

    I have a picture of the screen in form .pdf or .jpg.

    How can I insert it into a message?

    I see the icon "Insert an Image" but requires a url.

    I don't understand this.

    What I'm really after is, what the little symbol that looks like a dollar bill or maybe a way to tape cassette?

    I have never seen anything like the lack of documentation for a device such as that I am having with this BB 8330.

    Of course, my (large) company provided. Maybe they kept the documentation themselves.

    WelCme the supprt frums!


    H2Omelon wrote:

    I have a picture of the screen in form .pdf or .jpg.

    How can I insert it into a message?

    Are you talking about here on the frums? If then you go to your image, you are eager to copy - right click, and then click COPY IMAGE LOCATION = when you press the little tree this forum - insert image - stick.

    I see the icon "Insert an Image" but requires a url.

    I don't understand this.

    What I'm really after is, what the little symbol that looks like a dollar bill or maybe a way to tape cassette?

    Search tape little is a voicemail.  It appears when someone has left you a message VM.

    I have never seen anything like the lack of documentation for a device such as that I am having with this BB 8330.

    Of course, my (large) company provided. Maybe they kept the documentation themselves.

    I have the 8330 - takes a little time to get used to and I am always finding new things and shortcuts on it.  This forum is a great resource to find your answers! I hope this has been helpful!

  • Create a button to insert an image in a pdf form which disappears once the user hits, a form submission or form reset button?

    I am updating a form of company which was created in Livecycle Designer, by a user who has left the company, which has an image button to join.  The Acrobat of the company bought dc pro for me, thinking that I would be able to update the form, but it is not able to be edited, and I therefore re-created form in ms pro.

    I can get the user to insert an image PDF using javascript

    event.target.buttonImportIcon ();

    However not being is not familiar with javascript and still learn acrobat, it's that I can get in the previous forums before I lose myself.

    The javascript works fine to get the image, however is not immediately clear the reset form or submit buttons for forms are used.

    Can someone please give me simple and clear instructions on how to do it?

    P.S. Adobe website does not mention anything not being able to edit livecycle designer forms in other versions of acrobat, so I'm already very frustrated.  So please do replies newby friendly.

    You cannot delete directly. What you can do is a kind of a hack, which is to copy the icon of a button that has not applied to icon.

    If you create an image button (it can be hidden), set it to an icon, but don't actually select one.

    When you want to reset your other button, you can use this code:

    this.getField("Image1").buttonSetIcon (this.getField("EmptyImage").buttonGetIcon ());

  • When you use the 3D camera tracker, how can I insert an image instead of / on top of a solid?

    I'm just learning how to use the 3D camera Tracker feature.  I wanted to show what would look like a development project proposed along the coast and managed to get four cubes, representing four houses, appears in this video:

    Save our shores Gloucester: the back Shore, now with Mr Court! -YouTube

    Each of these cubes consists of four solid singles.  Effective, but not realistic.

    I would now like to do a similar thing for another construction project.  But for this project, the developer has some renderings of high quality that will look like the building, and I would like to insert these images in my video, rather than repeat my cubes of Day - Glo.

    I can't find a tutorial that shows how to do this, maybe because I did not come to the expression of right to describe.

    How can I achieve this?

    Thanks in advance.

    Just add your solids as placeholders and then add the image to the model and make the 3D layer. Now, hold down the SHIFT key and make the solid placeholder the parent layer of the 3D image. Now the SHIFT key will skip the image layer to the exact position of the solid. Then, simply adjust the rotation and scale. Then you remove the placeholder in parenting will disappear.

  • CC 2015 Dreamweaver crashing when inserting an image

    After the update of November, opening some files causes Dreamweaver cc 2015 planting.

    has decided to create a new html file but now Dreamweaver freezes when inserting a picture.

    Someone knows how to solve this problem, I have a-installed and re-installed and it is always to have the same effect

    I can insert the image of the local site (let's call it A) to files within a different local site and no crash occurs,.

    but try to insert the image of A site, and BOOM Dreamweaver stops.

    Inserting images to other local sites work well, but also try to insert images of his own image folder causes problems

    Nancy O. says:

    When DW starts acting weird, the first thing to try is delete the Cache of corrupt in DW

    http://forums.Adobe.com/thread/494811

    If this does not help, try to restore preferences

    https://helpx.Adobe.com/Dreamweaver/KB/restore-preferences-Dreamweaver-CS6-cc.html

    Nancy O.

    Thank you Nancy O, just tried that, but it did not work.

    I think it has to do with the images and how Dreamweaver sees them.

    I have just re-exported images JPEG in Photoshop and they work fine.

    The images were created just before the last update CC causing the problem.

  • Why the function "Insert an Image" does not insert the code at the location of the cursor?

    I mainly work with php files and I'm still working in code view only.  I am editing the php files that I wrote using a different code a few years ago Editor.  I place the cursor to the place in the code where I want to go the image tag and use the menu "insert an Image".  The code is then placed directly under the < body > tag.  It is always placed in the same place no matter where I place it in the code.  Can someone tell me what is happening here?  Thank you.

    Not sure why it does not insert the image where the cursor is, but my workflow is much easier. I mainly work in code view and I will drag the image from the files Panel to where I want to in my document. Simple

  • When I insert an image in the sequence. the photo that it is expanded

    I am currently using Adobe PREMIERE PRO CS6. And I'm doing a video for school. I tried to insert an image of the main sequence. but the image were bigger so big that only part of the picture is visible. This is because the size of the image were too big. How can I solve this problem. same thing with the video, when I insert the video, the video was really small. and with a black space around it. I change the size of the screen adjustment of 100%, but the resolution of the video no longer so clear. I tried to do the same with the image, such as change the adjustment to certain % screen size. but it does nothing. the image remains on this certain task was be amplified. and if I spend 20%, only got smaller image with black spaces around it. How can I solve this problem. I do the video for school so it is really important that I get this fixed a problem.

    Smilyfrowned wrote:

    Thank you very much. I did what you said and it worked. Is there a more effective way instead of scaling? as the photo would automatically put the scale itself

    Put scale by default to fit the size of the image in the preferences, its general slot.

    If nature does not have the same proportions that the sequence you will have small black highlight and then you will always have to scale.

  • Form field Acrobat that allows the user to the reader to browse and insert an image in a pre-defined area

    Is there a way to insert a form field in an AcroForm which allow users of Reader to browse and insert an image in this form field?

    I know that LiveCycle can do, but I need to do using an AcroForm. Or maybe there is a third party plug-in that can be used in an AcroForm to do this?

    No, you don't need 11 Acrobat to create a form that uses this method, but your Reader users will have to upgrade. I don't see that they have yet to announce the date output to drive, but in the past, it was usually in about a month of the announcement.

  • CS5.5 "Insert an image" missing from the dialog box

    Hello

    Last few days when clicking "Insert an image" in the menu Insert, or in Control Panel insertion, "Image Tag Accessibility attributes" box appears, but not the dialog box to select an image. After clicking on OK, a placeholder image is open, and then only I can with the right button or go in the property inspector to select an image.

    What I am doing wrong?

    Thank you for Singapore

    Last few days when clicking "Insert an image" in the menu Insert, or in Control Panel insertion, "Image Tag Accessibility attributes" box appears, but not the dialog box to select an image.

    In the Preferences dialog box, go to the general tab and make sure 'see the dialog box when inserting objects' is checked.

    HTH,

    Randy

  • How can I insert an image

    Hello;

    I use Dreamweaver MX 2004. I'm trying to insert a JPEG image in one of my Web pages, then position it on the page where I want.

    The book helps Dreamweaver and a 3rd party tells me to place the insertion point to where I want the image to appear in the Document window. When I click my mouse in the body of the page where I want the image appear as the cursor jumps to the upper left corner of the screen (page) if I insert the image the image is behind others in the upper left corner of the page.

    How to "place the insertion point" where I want the image to appear?

    Thanks for your help!

    Hi Bill,

    > How can I 'move the insertion point to ' where I want the image to appear?

    I am afraid it is not quite easy... you use the tables of old school or (better) CSS positioning to divide the page into blocks, then you can fall into the image (or assign as a background image), but it's not really like a desktop publishing computer or app from graphics where you can drag and drop items anywhere. You have to structure manually.

    If you would save a good bit of frustration to get some basic Dreamweaver (or, better yet, HTML and CSS) tutorials under your belt before jumping into the program.

Maybe you are looking for

  • the vaio l series upgrade to ssd

    I have a Vaio L series two year while a (VPCL229FG). I want to improve the internal HD 1 TB for an SSD or a hybrid SSD hard drive. Is someone doing a swap on the hard drive of a vaio L series all-in-one? all the instructions of opening and the size o

  • Tektronix 3032B

    I'm controlling the tektronix 3032B carried by the Labview 'Tektronix TDS 3000 series single channel Waveform acquire' by national instrument.  But the wave shape is in the form of cluster. How it save to file? Please suggest. Thank you

  • can't see the readers of CD - DVD (two of them) in the Device Manager-

    over the years but recently lost sight - tried following the advice of XP but don't have filters upper and lower to remove in regedit either. all ideas

  • Cannot use the files copied from Windows 8/7/Vista in windows XP.

    Always there are people who use Windows Xp, the problem is that when I copy the files in my USB and use it in my friends house, then Windows XP said 'pen drive not formatted ".

  • ACPI drivers for Pavilion 17-e020us

    I have a few 'unknown devices' showing in Device Manager with the typical brands and I can't find the driver on the HP website for the laptop. Material ID are; ACPI\HPQ0004\3 & 11583659 & 0 and ACPI\HPQ6001\3 & 11583659 & 0 someone has a link to this