How to insert /retrieve images ??

hi everyone...
i want to get image from my filesystem onto my form and insert the image into oracle 10g database from my form using forms 6i
and
i want to retrieve images from oracle 10g database onto forms using forms 6i.
if possible i want to generate a report to print the retrieved images from my form using forms 6i.
please kindly help me with detail coding as i'm new to forms and i had given to perform the above task.
thanks in advance
Regards,
Santosh.Minupurey

create a table with 2 fields (label varchar2(25) ,image blob)
create a data block with the above table
place 2 buttons (get and save) on the form
trigger for get_button (// when_button_pressed event)
read_image_file(:block_name.text_item_name,'jpg',blockname.image_item_name); --this will retrieve image from the local system and place it on the image item
(enter the full path of image with extension in text_item after complie)
trigger for save_button (// when_button_pressed event)
read_image_file(:block_name.text_item_name,'jpg',blockname.image_item_name);
commit; --saves it in the database
sorry but i couldn't retrieve it from database....

Similar Messages

  • How to insert the image or logo into the table as a field in webdynpro abap

    Hi Friends,
    Please tell me how to insert the image or logo into the table as a field in webdynpro abap.........

    Hi Alagappan ,
          In your view layout you take table UI element and then you bind it with some context nodes.
    The attributes of your nodes comes as a field.
    Now in these fields you can set various properties and image is one of them.
    Go to ->
    1. View Layout -> Right Click on ROOTUIELEMENTCONTAINER -> INSERT ELEMENT -> TABLE
    2. Right click on table -> Create Binding.
       Here you have to bind it with the appropriate context node.
    You will get two properties here
    a- Standard Cell Editor :- ( make it image )
    b- Standard properties :- ( If required set image properties ).
    3. If you want put image from out side then import it as a mime object and set the source of your table field ( used as a image )
    also have a look :-
    [Image Properties|http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm]
    Hope this will solve your problem.
    Reply if any case of any issue.
    Thanks & Regards,
    Monishankar C

  • How to insert an image file in Oracle database

    hi
    can you please tell me how to insert an image file into oracle database????
    suppose there is one image file in c:\pictures\rose.jpg. how to insert that file into database? theoretically i know that will be BFILE type but i dont know how to insert that.
    will be waiting for your reply........
    thanks & regards,
    Priyatosh

    Hello,
    The easiest way to load a blob is to use SQL loader.
    This example comes from the utilities guide:
    LOAD DATA
    INFILE 'sample.dat'
    INTO TABLE person_table
    FIELDS TERMINATED BY ','
    (name CHAR(20),
    1 ext_fname FILLER CHAR(40),
    2 "RESUME" LOBFILE(ext_fname) TERMINATED BY EOF)
    Datafile (sample.dat)
    Johny Quest,jqresume.txt,
    Speed Racer,'/private/sracer/srresume.txt',
    Secondary Datafile (jqresume.txt)
    Johny Quest
    500 Oracle Parkway
    Secondary Datafile (srresume.txt)
    Loading LOBs
    10-18 Oracle Database Utilities
    Speed Racer
    400 Oracle Parkway
    regards,
    Ivo

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • How to insert multiple images

    How to insert multiple images in SQL/MySQL using servelet

    donsankar wrote:
    How to insert multiple images in SQL/MySQL using serveletuse a BLOB
    are you sure you need to store images in the database?
    why not store the image on the file system and store a link to the image file in the database
    you really don't gain much putting images in the database

  • How to insert an image and an icon in a JFrame !

    i am seeking for th efollowing :
    1/- how to insert an image in a Jframe ? i triied to use a label and set labelk icon with the specefic path but i can not see it neither in the jbuilder6 brower nor in the execution of the application ! how to deal with that please!
    2/- how to insert an icon to my window sothat it does not display the jbuilder 6's default icon
    ant help wil be really apreciated! thanks

    In JBuilder, create a new file called Frame1 then copy this code into it. It should give you a frame which will have a different icon in the frame title and an image in its pane.
    Change the name of the icon it uses to any gif file that you have on your pc.
    // START OF FILE
    import java.awt.*;
    import javax.swing.*;
    public class Frame1 extends JFrame {
         JLabel jLabel1 = new JLabel();
         public Frame1() {
              try {
                   jbInit();
              catch(Exception e) {
                   e.printStackTrace();
         public static void main(String[] args) {
              Frame1 frame1 = new Frame1();
              frame1.pack();
              frame1.show();
         private void jbInit() throws Exception {
              ImageIcon myImage = new ImageIcon("c:/data.gif");
              this.setIconImage(myImage.getImage());
              jLabel1.setText("jLabel1");
              jLabel1.setIcon(myImage);
              this.getContentPane().add(jLabel1, BorderLayout.CENTER);
    //END OF FILE

  • How to insert an image into mysql

    welcome to all,
    can any one tell how to insert an image into mysql database(BLOB). it is urgent.
    regards

    welcome to all,
    can any one tell how to insert an image into mysql database(BLOB). it is urgent.
    regards

  • How to insert an image between two pages?

    How to insert an image between two pages? and how do remove the line of separation between two pages?.
    Attached image shows, there is a photo of two pages and no line of separation in the pages!

    Michi Thanks, but that option is only available on one page (2 columns), not to put two pages! see new image

  • How to insert an image file as blob using JDBC Statement

    Hi,
    I'm new on java.
    I want the code to insert an image file in Oracle database whose data type is blob.
    i want to use JDBC statement not the prepared statement.
    Please help me out.

    user8739226 wrote:
    thanks for the solution.
    I want to ask one thing
    let say i've created a method in a bean in which i'm passing three parameters.
    One is tablename as String, Second is Name of tablefields as Object, Third is Values as Object
    Like:
    public synchronized int insert(String table,Object[] fields, Object[] values)Ah now we're getting somewhere. I was trying to come up with a situation where using a regular Statement over PreparedStatement would be viable and came up with practically nothing.
    In the method body i'm accessing the table fields and values and combining them into the insert sql query.
    how can i do this using preparedstatment.
    how do i come to know here in this bean that this value is int or string or date at runtime to use setInt, setString, setdate or setBlob respectively.That's your problem. Bad design. You want to make some sort of universal insert method that can insert anything anywhere. But it doesn't really make sense, because whenever you're trying to insert something, you know exactly what you want to insert and where. You could use a PreparedStatement at that point (although encapsulate it in its own method). Now you're trying to create your own poorly designed framework over JDBC that doesn't solve problems, only increases them.
    Above was the only reason i saw, i was using statement instead of preparedstatment as statement was looking easy in this situation.
    please, give me the solution of above using preparedstatment.No, rather you should reconsider your design. What advantage does your insert() method give you over, let's say using a regular PreparedStatement. Granted, you can put your connection opening and other boilerplate code in the method. But if that's your only problem, then your insert method isn't gonna be much use. You could always switch to JPA for example and work with that.

  • How do I retrieve images from the iPad simulator's Photo app?

    I created some images with my app running in the ipad simulator and redorded them in the photos app.
    How do I retrieve these images from the iPad simulator to my mac?
    Thanks in advance! =]

    Hey ArmidaKers,
    Thanks for using Apple Support Communities.
    This article explains how to restore a backup from iCloud.
    iCloud: Restore your iOS device from iCloud
    https://support.apple.com/kb/ph12521
    Have a nice day,
    Mario

  • How to insert a image which is in word file in a report ?

    I must place a Logo in a report but the image is in a Office word file. If I had the image as a file , It was be certainly easy I think.
    What I can do to insert this image in my report ?
    Regards and Thanks for helps.
    I work in 6i Oracle Report.

    Thanks Ammad for your response.
    Then the provider of my image doesn't have pushed computing knowledge so it provides me as word file.
    Now I have copied it as you said in mspaint and save it as image.
    But in the Report the old logo is placed in a field as data from a table of database. the data in the table has 'Long Raw' type.
    Then now my problem is how to adapt my image as a field data in this table of Database to have the new logo.
    What I am doing this ? : place my image as data in the table so that I can position it in the field in report as source of data ?
    Thanks for helps.
    Regards.

  • How to insert embedded image into TextArea htmlText (and add IOErrorEvent.IO_ERROR listener).

    I unsuccessfully tried to find way to insert embedded image into TextArea via <img> tag. Can you point me out how to do this?
    Also, please, tell me how to handle IOErrorEvent from TextArea because adding IOErrorEvent.IO_ERROR listener to TextArea doesn't cause any effect when image url of img tag has not been found.
    Thanks

    i 've successfully inserted the image into the database... here is my code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package PMS;
    import java.io.File;
    import java.io.FileInputStream;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    public class Browse_java
    static Connection con=null;
    public static void main(String args[])
    try{
    System.out.println("(browse.java) just entered in to the class");
    con = new PMS.DbConnection().getConnection();
    System.out.println("(browse.java) connection string is"+con);
    PreparedStatement ps = con.prepareStatement("INSERT INTO img_exp VALUES(?,?)");
    System.out.println("(browse.java) prepare statement object is"+ps);
    File file =new File("C:/Documents and Settings/Administrator/Desktop/Leader.jpg");
    FileInputStream fs = new FileInputStream(file);
    byte blob[]=new byte[(byte)file.length()];
    fs.read(blob);
    ps.setString(1,"C:/Documents and Settings/Administrator/Desktop/Leader.jpg");
    ps.setBytes(2, blob);
    System.out.println("(browse.java)length of picture is"+fs.available());
    int i = ps.executeUpdate();
    System.out.println("image inserted successfully"+i);
    catch(Exception e)
    e.printStackTrace();
    finally
    try {
    con.close();
    } catch (SQLException ex) {
    ex.printStackTrace();
    }

  • How to insert an image into text area?

    Hi everybody,
    I have a proplem : insert an image into text area ( likely Yahoo Chat)
    eg : Hello,World :D =)) :x
    I can't do it.
    Can you help me?
    Thank you!
    Edited by: Chelsea_Drogba7589 on May 28, 2010 9:28 PM

    StanislavL wrote:
    [http://java-sl.com/tip_autoreplace_smiles.html]
    Neat example. :)
    Try this.I did and was at first confused because I expected the code to arrive on-screen looking like the screen-shot at the page. Then it occured to me to type some text including a smiley, and it changed to the icon as expected.
    For other people like me who are not quite very clever, how about adding an 'Instructions' section, or initializing the JEP with instructions?
    BTW -
    "The screenshot shows how it looks like:" reads better as..
    "The screenshot shows how it looks:"

  • How to insert a image file in oracle8i db

    hi..
    i want to add some new logo's in my oracle 8i database...i created the column and datatype for that but i don't know the proper command for
    insert the logo.
    so i need u r help..and i want to use that logo in my reports6i too.
    regards
    kannan

    Hi,
    Check this
    Insert Picture (image) using oracle forms
    HTH
    - Pavan Kumar N

  • How to insert GIF images in Blogs

    I am able to insert GIF images in to blogs... but its not playing .. only static..
    Any help..
    Thanks in advance..
    Regards,
    Mahesh

    Yes.. Its working perfect. (Sorry Jyoti sir for copy-paste)

Maybe you are looking for

  • Multiple where conditions in one parameter

    Hi, Is it possible to have more than one where condition in one parameter? For example, my WHERE_CLAUSE parameter holds the value "where id='12345' and name='john smith'" when i run the report, I get a [052008_033528064][][EXCEPTION] java.lang.NullPo

  • SanDisk Ultra SDHC 4GB Problems

    I have a MacBook Pro that I recieved for Christmas in 2009. I have this SanDisk Ultra SDHC (15MB/s) card that I use in my Canon digtial camera. When I insert the card into my Mac, it reads the card and brings up the pictures, and allows me to import.

  • GE 70 2OE SSD Question

    Hello , 1-  What is the model of this SSD GE 70 2OE ? Sandisk ? Kingston ? Please Model Name ? 2- How Much Life SSD ? 1 Year ? 2 Year ?

  • Cost/benefits of release() on NamedCache

    Based on the javadoc I'm a little concerned about the cost of calling release() on NamedCache every time the cache reference is looked up and used. I'm running an app inside Weblogic 8.1 SP2 using the Coherence RAR. Every invocation of the cache will

  • Folio Builder Not working

    Folio Builder panel is requesting I download the latest update which I have done and installed and restarted. However Folio Builder panel is requesting I download like nothing happened. I am using Indesign CS5.5 and have updated the correct download