How to save photo in oracle10gee database using developer10g

I have oracle10g enterprise edition database and developer10g front end.
i have a table in my database
desc employee_personnel
emp_id varchar2(10)
emp_name varchar2(80)
emp_pic blob
I create form using forms10g and now i want to browse that photo using forms10g and want to save it in oracle10gee database.
and when i will query it next time it will the photo
how can i do it
plz help me in detail

see here
http://halimdba.blogspot.com/2011/01/how-to-insert-multimedia-data-image.html
regards
Halim

Similar Messages

  • How to save pdf file in database

    Dear All,
    my application is forms 6i and database is 8i,requirement is that how to save pdf file in database and users can view through forms

    I'll apologize up front for the length of this post. I have a few database procedures I created that write a file to a BLOB column in a table as well as retrieve the BLOB from the column after it stored there. I have successfully stored many different types of binary file to the database using these procedures - including PDF files. I have not used these procedures in a Form so I can confirm that they will work, but theoretically they should work. I'm including the code for each procedure in this posting - hence the apology for the long post! :-)
    Also, since these procedures reside on the database you will need to use Forms TEXT_IO built-in package to write your file to the server before you can use these procedures to store and retrieve the file from the database.
    These procedures reads and writes a binary file to a table called "LOB_TABLE." You will need to modify the procedure to write to your table.
    -- Author :  Craig J. Butts (CJB)
    -- Name   :  load_file_to_blob.sql
    --        :  This procedure uses an Oracle Directory called "IN_FILE_LOC".  If you
    --           already have a directory defined in the database or would prefer to use
    --           a different Directory name, make sure you modify line 21 to reflect the
    --           new Directory name.
    -- ==================================================================================
    -- History
    -- DATE        WHO         DESCRIPTION
    -- 12/11/07    CJB         Created.
    CREATE OR REPLACE PROCEDURE load_file_to_blob (p_filename IN VARCHAR2) IS
       out_blob    BLOB;
       in_file     BFILE;
       blob_length INTEGER;
       vErrMsg     VARCHAR2(2000);
    BEGIN
       -- set the in_file
       in_file := BFILENAME('IN_FILE_LOC',p_filename);
       -- Get the size of the file
       dbms_lob.fileopen(in_file, dbms_lob.file_readonly);
       blob_length := dbms_lob.getlength(in_file);
       dbms_lob.fileclose(in_file);
       -- Insert a new Record into the tabel containing the
       -- filename specified in P_FILENAME and a LOB_LOCATOR.
       -- Return the LOB_LOCATOR and assign it to out_blob.
       INSERT INTO lob_table (filename, blobdata)
          VALUES (p_filename, EMPTY_BLOB())
          RETURNING blobdata INTO out_blob;
       -- Load the file into the database as a blob.
       dbms_lob.open(in_file, dbms_lob.lob_readonly);
       dbms_lob.open(out_blob, dbms_lob.lob_readwrite);
       dbms_lob.loadfromfile(out_blob, in_file, blob_length);
       -- Close handles to blob and file
       dbms_lob.close(out_blob);
       dbms_lob.close(in_file);
       commit;
       -- Confirm insert by querying the database
       -- for Lob Length information and output results
       blob_length := 0;
       BEGIN
          SELECT dbms_lob.getlength(blobdata) into blob_length
            FROM lob_table
           WHERE filename = p_filename;
       EXCEPTION WHEN OTHERS THEN
          vErrMsg := 'No data Found';
       END;
       vErrMsg := 'Successfully inserted BLOB '''||p_filename||''' of size '||blob_length||' bytes.';
       dbms_output.put_line(vErrMsg);
    END;
    -- Author   :  Craig J. Butts (CJB)
    -- Name     :  write_blob_to_file.sql
    -- Descrip  :  This procedure takes a BLOB object from a database table and writes it
    --             to the file system
    -- ==================================================================================
    -- History
    -- DATE        WHO         DESCRIPTION
    -- 12/11/07    CJB         Created.
    CREATE OR REPLACE PROCEDURE write_blob_to_file ( p_filename IN VARCHAR2 ) IS
       v_blob      BLOB;
       blob_length INTEGER;
       out_file    UTL_FILE.FILE_TYPE;
       v_buffer    RAW(32767);
       chunk_size  BINARY_INTEGER := 32767;
       blob_position INTEGER := 1;
       vErrMsg     VARCHAR2(2000);
    BEGIN
       -- Retrieve the BLOB for reading
       BEGIN
          SELECT blobdata
            INTO v_blob
            FROM lob_table
           WHERE filename = p_filename;
       EXCEPTION WHEN OTHERS THEN
          vErrMsg := 'No data found';
       END;
       -- Retrieve the SIZE of the BLOB
       blob_length := DBMS_LOB.GETLENGTH(v_blob);
       -- Open a handle to the location where you are going to write the blob
       -- Note:  The 'WB' parameter means "Write in Byte Mode" and is only
       --          available in the UTL_FILE pkg with Oracle 10g or later.
       --        USE 'W' instead for pre Oracle 10q databases.
       out_file := UTL_FILE.FOPEN('OUT_FILE_LOC',p_filename, 'wb', chunk_size);
       -- Write the BLOB to the file in chunks
       WHILE blob_position <= blob_length LOOP
          IF ( ( blob_position + chunk_size - 1 ) > blob_length ) THEN
             chunk_size := blob_length - blob_position + 1;
          END IF;
          dbms_lob.read(v_blob, chunk_size, blob_position, v_buffer );
          UTL_FILE.put_raw ( out_file, v_buffer, TRUE);
          blob_position := blob_position + chunk_size;     
       END LOOP;  
    END;Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • HT1665 How to save photo from iPad to external memory card?

    How to save photo from iPad to external memory card?

    It's very difficult.  I have read where some people have done this with much angst.  You can use the camera connection kit to load pictures to your iPad.  The reverse is not really supported.  A much simpler solution would be to email the photo to your home email account and then copy it to external memory. 

  • New help with my mac air and airport extreme time capsule dont know how to save to time capsule and use as a external hd

    new help with my mac air and airport extreme time capsule dont know how to save to time capsule and use as a external hd would like 2 store my home videos and pictures on the time machine (ONLY) as the MAC AIR has storage space limited space please help. THANK YOU.

    See the info here about sharing or using the TC for data.
    Q3 http://pondini.org/TM/Time_Capsule.html
    It is extremely important you realise.. the Time Capsule was never designed for this.
    It is a backup target for Time Machine.. that is the software on the computer that does backups.. it has no direct connection to the Time Capsule.
    It has no ability to back itself up.. unlike all other NAS in the market. It is therefore likely one day you will lose all your files unless you seriously work out how to backup.
    The TC is slow to spin up the hard disk and fast to spin down. iTunes and iPhoto will continually lose connection to their respective libraries.
    iPhoto in particular is easy to corrupt when you move photos over wireless into the library.. once corrupted all is corrupt. A single photo will ruin it all.. so backup is utterly essential.
    Time Machine cannot do backups of network drives. ie the TC. You will need a different backup software like CCC. You will then need another target to backup to..

  • How can I connect to the database using ODBC within excel.

    Hi,
    How can I connect to the database using ODBC within excel and just refresh the data when needed.
    Thanks,
    Priyanka
    Edited by: user554934 on Jun 9, 2009 2:53 AM

    This is NOT an APEX relevant question, try posting it in the SQL/PL/SQL Forum..
    Thank you,
    Tony Miller
    Webster, TX

  • Does anyone know how to save multiple webpages in safari using automator?

    Does anyone know how to save multiple webpages in safari using automator?

    You will likely get better program help in a program forum
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • How to start or shut down database using sql developer in windows

    Dear Sir/Madam,
    how we start or shut down database using sql developer in windows
    we are using oracle 11g release2, unix, java & oracle oracle weblogic administration
    Thanks & Regards
    Manish Kumar
    Datbase Team
    TCS Ltd.

    HI, Welcome to OTN form,
    SHUTDOWN is not a SQL statement but a SQL*Plus command . You cannot use SHUTDOWN in PL/SQL.
    Check following link:
    http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve042.htm#i2699551
    More Information please check OTN discussion: https://forums.oracle.com/thread/2349159
    Thank you

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • How to save photos from Facebook on Nokia Asha 210...

    Hi,
    Anyone know how to save photos from Facebook or from Facebook messenger on the Asha 210? Can't seem to find a way to save photos people post or send me to my phone.
    Thanks

    hi mate if there are no options within the Facebook app, the only other thing you can try is visiting the mobile version of the Facebook website thru the phone browser itself, and seeing if there is a save picture option in there..

  • How save & retrive data from database using flex, coldfusion, sql server

    hi , i am very new in flex, i am trying to insert data in
    database using flex2, coldfusion, sql server. any one can help me
    please. or give me any example.

    Hi try to goto the following sites, you will get some
    direction to think
    http://weblogs.macromedia.com/pent/archives/2006/11/example_of_flex.cfm
    http://pdxphp.org/node/258
    Good Luck

  • How to save photos from an external memory

    How do I save photos to my new MacBook Air from an external memory (StoreEdge)? And how do I know where the photos that I can view in Iphoto are stored? I thought I had copied a whole Iphoto library from StoreEdge to my MacBook, but when I try to remove the StoreEdge it says that it's not possible because it's being used.

    You can import the photos into iPhoto by using the iPhoto File menu "Import to Library."
    The default location for the iPhoto Library is username/Pictures/iPhoto Library
    You should only work with the library using iPhoto (i.e., don't attempt to open the library and work with the files inside directly from Finder).

  • How to save User input into DB using webdynpro abap

    Hi,
    Im trying to create an application using webdynpro abap.
    I want to know how to save the data input by user, into a database table.
    In my UI, I have a table control which is editable and user inputs data into this. I need to know how i can transfer this data to a DB table.

    hello,
    u can do it by reading ur context node.
    we bind our UI elements to context attributes of appropriate type .
    we read their values using the code wizard or by pressing control+F7, click on radio button read node/attribute
    here for ur specific case , u must have binded ur table control with the context attribute , now u need to simply read this attribute
    eg suppose u have created a context node " cn_table"
      reading context node cn_table
       DATA : lo_nd_cn_table TYPE REF TO if_wd_context_node ,
             lo_el_cn_table TYPE REF TO if_wd_context_element ,
             ls_cn_table    TYPE wd_this->element_cn_table.
    *   navigate from <CONTEXT> to <CN_TABLE> via lead selection
      lo_nd_cn_table = wd_context->get_child_node(
                       name = wd_this->wdctx_cn_table ).
    **    get element via lead selection
      lo_el_cn_table = lo_nd_cn_table->get_lead_selection(  ).
      lo_el_cn_table->get_static_attributes( IMPORTING
                 static_attributes = wa_table ).
    here wa_table is the work area of structure type . u need to create a structure first with the same variables as there are the context attributes in ur node cn_table
    in ur
    now ur wa_tablecontains value
    u can nw use appropriate FM to update , delete and modify the DB table using the value
    u cn directly use SQL statements as well in the method of ur view , but direct SQL statements are nt recommende
    rgds,
    amit

  • Save a picture to database using webservice on wls6.1

    Hi all,
    I want to save employee's picture (the field is blob type in table ) to
    database using webservice , the server is weblogic6.1 , how to do it ? Thank
    you very much.
    Best Regards
    lcl

    Well, your choices in SOAP are either to encode the picture and stuff it
    in the SOAP body as a parameter or use SOAP w/ Attachments and send the
    picture along as an attachment.
    SOAP w/attachments is not supported until WLS 7.0 so unless you're
    willing to upgrade, you'll have to encode the picture and pass it
    through as a parameter. Once you're in the EJB, you can do the db insert.
    Another option would be to use HTTP to upload the picture and then make
    the webservices call to do the update.
    -- Rob
    lcl wrote:
    Hi all,
    I want to save employee's picture (the field is blob type in table ) to
    database using webservice , the server is weblogic6.1 , how to do it ? Thank
    you very much.
    Best Regards
    lcl

  • How to save an image to database and retreive from it.

    how to save an image retreived from an bytearray to database and retreive back the image from database....pls specify the steps and the query.

    You can use the JDBC API for database connectivity and you can use SQL to query the database.
    JDBC tutorial: http://www.google.com/search?q=jdbc+tutorial+site:sun.com
    SQL tutorial: http://www.google.com/search?q=sql+tutorial+site:w3schools.com

  • How to save the Icon  to database or .ico file?

    hi
    I get Icon instance by using
    Icon myIcon= FileSystemView.getFileSystemView().getSystemIcon(new File("J:/Program Files/XPSTool/XPSTool.exe"))
    but I not know how to save the myIcon to the database or a .ico file ;
    please help me !!!!!!!
    thanks vey much .

    Doublepost: http://forum.java.sun.com/thread.jspa?threadID=790795

Maybe you are looking for

  • PowerPoint using macro to delete text boxes after printing

    Hi, We created custom shows in Powerpoint and are running a macro to insert temporary page numbers on the slides before printing.  The issue is that I need to remove the page numbers after printing.  I'm a novice at VBA so I'm sure there is an easy s

  • Reg: FM - DATE_CONVERT_TO_FACTORYDATE not working for 2011

    Hi All, The FM - DATE_CONVERT_TO_FACTORYDATE was working correctly so long. This FM is not working for the year 2011 alone!! When i check the FM, it is actually a C module which is called and is not allowed for debugging. Can anyone help as to what c

  • GDM doesn't show up anymore after installing catalyst, Xorg works fine

    Hi, I just installed catalyst-hook from Vi0L0 and my situation is this: when I boot my computer the output on the tty1 gets stucked after the checking the filesystem with systemd-fsck and nothing appears after that, no blinking cursor, no prompt that

  • Print to video countdown/slate question

    Hey Guys, Just finished my first attempt at a TVC. The governing body here in Oz says that if my TVC starts with a black frame (it does - fades up from black) that i need to have in between my countdown and the sart of the Ad Black frames with a whit

  • Nach dem Exportieren werden im PDF Fotos anders dargestellt

    Hallo in die Runde, bin noch Anfänger und suche HIlfe, möchte ein Indesign CS2 -Dokument (TIFF Foto und Text) in ein PDF verwandeln, welches als Mailanhang verschickt werden soll. Das Problem ist, das Foto erscheint dann im PDF verglichen mit dem ori