Inserting image into table

hi,
i m create table, then create procedure, procedure is successfully compile, but when i m trying to insert image into table it error out.
for inserting image i go with
EXECUTE insert_image_file(1,'C:\sunset.jpg');
sunset.jpg is image which i want to insert in table, and which is present on 'c drive'.
when execute the following error are shown
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 635
ORA-06512: at "SCOTT.INSERT_IMAGE_FILE", line 26
ORA-06512: at line 1
how to solve it.
regards
prashant

Prashant wrote:
CREATE OR REPLACE PROCEDURE insert_image_file (p_id NUMBER, p_image_name IN VARCHAR2)
...snipped...Not very nice code... why create an empty image row, then lock it (it is already locked by the uncommitted insert statement), and then update it again? Not very efficient or sensible.
image is on local machine.When a row is created on the server from user input on some PC, who supplied that input? Who read the user's keyboard input on that PC to obtain the values for the columns for the row to create?
Did PL/SQL read the keyboard of that remote PC? Of course not. The client program on that PC read the keyboard input. It then made a client call to the Oracle server. It supplied the data entered via the keyboard by the user to the Oracle server (using a PL/SQL call or using a SQL statement call to Oracle).
Now why would a local image data on that PC be treated any differently than the keyboard data on that PC? How can you expect PL/SQL code running on the Oracle server, to read that image data from the remote PC when the same PL/SQL code is incapable of reading keyboard input from that very same PC?
You need to review your understanding of client-server and how it pertains to using Oracle within client-server architecture.

Similar Messages

  • Error in inserting images into table

    Hi All,
    I am trying to insert images into a table.
    Followed these steps:
    CREATE TABLE XX_DEMO_IMG_TBL
    file_id      NUMBER(5),
    file_name      VARCHAR2(30),
    file_data      BLOB
    LOAD DATA
    INFILE *
    REPLACE
    INTO TABLE XX_DEMO_IMG_TBL
    FIELDS TERMINATED BY ','
    file_id INTEGER(5),
    file_name FILLER CHAR(30),
    file_data LOBFILE (file_name) TERMINATED BY EOF
    BEGINDATA
    1,c:\1.txt
    used sqlldr cmd
    Got the following error:
    *ecord 1: Rejected - Error on table XX_DEMO_IMG_TBL.
    ORA-01460: unimplemented or unreasonable conversion requested*
    I am using SQLPlus: Release 10.2.0.3.0 -*
    Can any one please guide where am i going wrong ?
    Thanks,
    Saritha

    Thanks for your time.
    I got a solution for this, I modified my control file like this..
    LOAD DATA
    INFILE *
    REPLACE
    INTO TABLE SCOTT.XX_DEMO_IMG_TBL
    FIELDS TERMINATED BY ','
    file_id ,
    file_name ,
    file_data LOBFILE (file_name) TERMINATED BY EOF
    BEGINDATA
    1,c:\Users\SariRavi\Desktop\logo.gif
    and it worked.
    Thanks,
    Saritha

  • Insert image into table

    Please let me know how to insert images to table using SQLDeveloper?

    Some history...
    SQL Developer 1.2.1 actually does support loading BLOBs and it has an internal viewer that can display some, but not all, common extensions (e.g., jpeg images will display, but not flv - flash). The 1.2.1 UI is different than the 3.0/3.1 UI Jim describes in his blog post: double clicking on a BLOB cell in the Table Data tab causes it to display a "..." at the right-side of the cell. Clicking that takes you to the Edit Value dialog where Load/Save/View capability resides.
    External editor support was in place at least by 2.1, but large BLOBs seem rather slow to load. Improved performance and the current UI appeared at least by 3.0, including the Pencil icon and the hyperlinks.
    -Gary

  • How to insert image into table and to in Oracle 9i intermedia?

    Mr Lawrence,
    I want to ask something:
    I use Oracle 9i intermedia
    If i use this script:
    CREATE TABLE images (
    file_name VARCHAR2(100) NOT NULL,
    image ORDSYS.OrdImage
    then
    CREATE OR REPLACE DIRECTORY imgdir AS 'd:/data';
    then
    INSERT INTO images (file_name, image)
    VALUES ('tree', ORDSYS.ORDImage.init('file','imgdir','tree.jpg' ));
    I put tree.jpg in directory d:/data in my hard drive.
    Is my tree.jpg file had already get in to my images table?
    I'm little confuse, because when i check my table with this script:
    select file_name, i.image.getWidth() from images i;
    it's show that my i.image.getWidth() for file_name tree is empty.. that mean my tree.jpg doesn't get in to my table.. am i correct?
    N also i want to ask how to display to screen all of my image from images table?
    Is it posible Oracle 9i intermedia to support display image from table?
    How?
    thanks Mr Lawrence

    -- First step would be to create a directory in oracle and map it to the folder where your image resides.
    create directory image_dir as *'c:\image_dir';*
    Then you would have to use a procedure to insert the image in your table. SO first create a table to hold the image. Note that you have to use a BLOB to insert the image.
    CREATE TABLE test_image
    ID NUMBER,
    image_filename VARCHAR2(50),
    image BLOB
    Now let's write the procedure to insert the image in the table above.
    CREATE OR REPLACE PROCEDURE 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;
    Now execute the procedure to insert the image.
    EXECUTE insert_image_file(1,'test_image.jpg');
    Thanks,
    Aparna

  • Inserting blob image into table

    ora.gif, image001.jpeg are the image names .these are stored in the location D:\oracle\Bfiles
    create directory BFILE_FILES as ‘D:\oracle\Bfiles';
    i want to insert the 2 images into table using blob
    how to create the table and how to insert and how to test that image is inserted or not

    Tom Kyte has it all Here

  • Inserting Image into a BLOB column in Oracle9i

    Hi,
    I am unable to insert image into a BLOB column. I am using Forms 6i REL 2 and Oracle 9i. But I could do it on Oracle 8i with same Forms version.
    Same thing is true for CLOB in 9i.
    Would you please try with this code?
    TABLE
    Create table x
    (Id number,
    Name CLOB,
    Pict BLOB);
    WHEN-BUTTON-PRESSED trigge
    declare
         x varchar2(265);
    begin
         x := get_file_name;
         read_image_file (x, 'GIF', 'picture.pict');
    end;
    Take care,
    Tarek

    Forms 9i and Oracle 9i work fine together for this case.

  • Insert data into table from JSP page using Entity Beans(EJB 3.0)

    I want to insert data into a database table from JSP page using Entity Beans(EJB 3.0).
    1. I have a table 'FRIENDS', (in Oracle 10g database).
    2. It has two columns, 'NAME' and 'CITY'. Both have datatype strings(varchar2).
    3. Now from a JSP page, having two textfields, 'NAME' and 'CITY', I want to insert data into table 'FRIENDS'.
    4. In between JSP and database is a Entity Bean(EJB 3.0) and a stateless session bean.
    5. I am using JDev as editor.
    Please provide me code ASAP or link with similar example.
    Thank you.
    Anurag

    Hi,
    I am also trying that scenario. So u can
    Post the jsp form data to a Servlet which will act as a Controller.
    In the servlet invoke the business method.
    Similar kind of app is in www.roseindia.net
    Hope this would help u.
    Meanwhile if u get any optimal solution, pls post it.
    Thanks,
    Happy Java Coding.

  • How to insert data into table control

    hi experts,,
           i have inserted data into data base table through table control .
    now i want to insert data into table control through database table.
      how to delete data from table control for selected row

    Hi
    go through this link.
    http://www.****************/Tutorials/ABAP/TableControl/Demo.htm

  • Inserting images into a movie that are not photos

    Is there anyway to insert images into an iMovie (such as *.gif) files? Alternatively, is there anyway to insert powerpoint slides into an iMovie (because I can easily get the images into power point).
    Can I put an image in one of the title frames or transitions?
    Thanks
    Dan

    I am not sure about gif (but you could easily try it). JPEGS (.jpg) work and .png work for sure.
    It is straightforward to save a powerpoint page as a jpeg.

  • Correct workflow when inserting images into text, InDesign CS4

    Hi,
    I am new to InDesign and I have a problem regarding a really basic thing and I would be very grateful for help.
    I am writing an article which is about 10 pages long. It consists mostly of text. I have finished writing and now I want to add some illustrations with descriptions. I've already figured out it's best to insert images into the text frame so they behave as "anchored objects" and they move together with text when I add or delete something on previous pages. Now I would like to place TWO OR MORE images, one next to each other, in a line. This is a bit tricky but I created an object style with Position: Custom in "Anchored object options" and it works more or less fine. This works great but now it would be hard to add descriptions to these images that would still be anchored.
    So I created something different. I made an empty rectangle frame, a small text frame under it and grouped them. Then I placed it in my master text frame and basically did the same thing as for previously described images. Now I place the newly loaded image in the empty rectangular frame and add text in the empty text frame. BUT now I have problems with frame size for different-size images.
    What if I have a REALLY LONG article and want to add LOTS of images with decriptions that would be anchored in the text so I can edit previous pages? I can do this my way, but it's extremely uncomfortable and takes ages. Is there any comfortable, non-destructive workflow for doing such things?
    Sorry for my English.

    Hi,
    I would recommend following steps:
    Place one or more images
    Don't anchor them yet.
    Arange them (the images) relatively to each other, add a text frame and arrange them correct relatively to the images.
    Group images and text
    Copy (or cut) them into the clippboard
    Set the curser into the text where it should flow
    Paste it
    Adjust the anchored object (the group)
    You need to group several objects to anchor them together as one anchor.
    Further recommendation:
    For the images I would specify an object style for fitting, stroke, corner optione.
    For text frames I would specify an object style for text object options, like text offset, and used paragraph style, no boarder, etc.
    For the group I would spcify an object style which leaves above mentioned settings undefined (option field is grea or has a dash). But the anchored position of the whole group and text wrapping should be specified.
    Willi Adelberger

  • Please recommend if we have options to read xml file and insert data into table without a temporary table.

    Please recommend if we have options to read xml file and insert data into table without a temporary table. 

    DECLARE @data XML;
    SET @data =N'<Root>
    <List RecordID="946236" />
    <List RecordID="946237" />
    <List RecordID="946238" />
    <List RecordID="946239" />
    <List RecordID="946240" />
    </Root>'
    INSERT INTO t (id) SELECT T.customer.value('@RecordID', 'INT') AS id
    FROM @data.nodes('Root/List')
     AS T(customer);
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Insert image into a .pdf using InDesign

    Can I insert image into a .pdf using InDesign....

    You can place a PDF as an image in InDesign, then add more content and export a new PDF.
    There are also commercial plugins available that will allow you to open a PDF as editable objects in InDesign.

  • Inserting images into indicators

    hello,
    i wanted to know if there is any way to insert images into indicators???
    for example if iam having an indicatoor showing the speed of motor shaft is there any way by which i can have an image of a rotating shaft rotating at different speeds ( depend on some parameters back ground)  instead of just the numbers displaying the speed.
    thanks in advance,
    vijay

    Take a look at the attached example which uses a picture ring.
    You can do various kinds of animation by using property nodes or the picture control, but that is already more complicated.
    Also, have a look at this for some more examples.
    Try to take over the world!
    Attachments:
    fan.vi ‏47 KB

  • Inserting images into form.

    Hi, i am new to midlet programming.
    Can anybody help me in inserting images into forms.
    And how do we set a thumbnail view in a form.
    Thanks.

    Hello,
    use
    Image tmp = Image.CreateImage ("/com/...../t.jpg");
    Form f = new Form ("title here");
    f.append (tmp);
    //if u want to insert it after loading the form use
    f.insert (index,tmp);
    Good Luck,
    Rawad

  • Insert data into table 1 but remove the duplicate data

    hello friends,
    i m trying to insert data into table tab0 using hints,
    query is like this..
    INSERT INTO /*+ APPEND PARALLEL(tab0) */ tab NOLOGGING
    (select /*+ parallel(tab1)*/
    colu1,col2
    from tab1 a
    where a.rowid =(select max (b.rowid) from tab2 b))
    but this query takes too much time around 5 hrs...
    bz data almost 40-50 lacs.
    i m using
    a.rowid =(select max (b.rowid) from tab2 b))....
    this is for remove the duplicate data..
    but it takes too much time..
    so please can u suggest me any ohter option to remove the duplicate data so it
    resolved the optimization problem.
    thanks in advance.

    In the code you posted, you're inserting two columns into the destination table. Are you saying that you are allowed to have duplicates in those two columns but you need to filter out duplicates based on additional columns that are not being inserted?
    If you've traced the session, please post your tkprof results.
    What does "table makes bulky" mean? You understand that the APPEND hint is forcing the insert to happen above the high water mark of the table, right? And you understand that this prevents the insert from reusing space that has been freed up because of deleted in the table? And that this can substantially increase the cost of full scans on the table. Did you benchmark the INSERT without the APPEND hint?
    Justin

Maybe you are looking for

  • Error while Editing Item - After importing pagegroup

    Hi All, We have Oracle Application server 10g (10.1.2) with Oracle Portal 10.1.2.0.0. as a test environment in win 2000 server. We installed a new Oracle Application server 10g (10.1.2) (production) with 10.1.2.0.2 in Suse Linux Enterprise server 9.

  • CRM - Add New Field in Competitor Product Screen

    We are looking for the right way to enhance the competitor product screen (object prod_cp) in CRM 7.0. We have explored several options and we would like to have a confirmation that we selected the right option for the CRM level we are on now. We che

  • Photos fuzzy

    I purchased iWork instead of upgrading Microsoft Office. I was hoping to insert photos into documents and get crisp printouts, like in Office (which I could not get with AppleWorks). My photos still come out with poor printing quality. Any suggestion

  • Is the 3.5 headset jack for handsfree & headphones

    Samsung Galaxy Note II - Sorry, but here is a really clueless question.  Is the 3.5 headset jack used for both hands-free connections and earphones for MP3? Thanks, Ed

  • IPhone with multiple operating systems (win/mac)

    Does the iPhone have any problems switching between operating systems? ie: if it's used for a few months with iTunes on a PC and then you switch to iTunes on a Mac, will there be any problem moving over all the contacts, music...etc? I remember some