Populating Image Item from 9i Database

Hi All,
I could store images into 9i database using Forms 6i Application. But I could not populate the stored images using Forms 6i application.
I appreciate very much for any help.
Thanks in Advance,
Umasankar.

Hi John,
Sorry for not explaining the problem completely.
Here is the details.
We are using Forms 6i and Oracle 8i. We are also planning to upgrade the database to 9i. I have application developed in Forms 6i. Using that application to connect 9i database, I could store images (from client system) into the 9i database (Using read_image_file). When I execute the query from Forms 6i application, I could not see the image from database. I was working OK with images on Oracle 8i database.
Thanks for your help.
Umasankar.

Similar Messages

  • Problem Populating Image Item From Database

    Hi All,
    I am using Oracle 9i & Forms 6i on Windows platform & working in client/server model. I created a form in which, I am reading an image file from the file system & then saving it into the database. In the Databse, i created the column as BLOB. But, when I query, this does not retrive the saved image in Image Item. But image is actually saved. When I tried, changing the database column to LONG RAW, it is working. I mean its reading the image in the image item from the database.
    Can anyone pls tell me, is there any problem like this, as we can retrive from LONG RAW but not from BLOB, or I am missin something here.
    Regards

    Hi,
    I use Forms 6i to save and retrieve image in BLOB column without problems.
    Some weeks ago, my column was long raw and I update it without problems. Nothing to do in Forms and juste modifiy query and recompile in Reports.

  • Populating menu items from the database...is it possible?

    hi
    using :forms 10g
    we have a requirement in forms where we need to populate the menu items from the database.first we used hiearchial tree where it was possible.but since the requirement changed i am not sure that whether the menu items can be populated by data from the database...will be glad if someone could throw some light on this issue...
    thanks

    You could always do it but would need to put a fix limit on the number of menu items.
    For example you could create a set of menu items at design time with the visible property set to False.
    While reading the database, you then set them to True while setting the label to whatever you require.
    But it all depends also on what you want your menu items to do when selected.

  • Populating Menu Items From the DataBase

    Using 10g
    hi
    is it possible to populate the menu items from the database using procedure?since our project is multilingual we have such a requirement..could someone throw some light on this?

    Hi ,
    Here is what you asked for.....
    PROCEDURE PRC_SET_MENUITEMS_ENABLED
    IS
       USERNAME_VAR PROSOPIKO.DBUSERNAME%TYPE;
          MENU_NAME_VAR MENUS_MODULES.MENU_NAME%TYPE;
          MENU_ID MENUITEM;
    BEGIN
          :SYSTEM.MESSAGE_LEVEL:='25';
       USERNAME_VAR:=FNC_GET_USERNAME;
       FOR z in (SELECT /*+LEADING(D C B A) index (A menu_modules_ind) index (D PROSOPIKO_AM_PRIMARY)*/
         DISTINCT MENU_NAME
            FROM MENUS_MODULES A, TASKS_MODULES B , TASKS_ROLE C ,PROSOPIKO D
            WHERE A.CODE_MODULE=B.CODE_MODULE AND B.CODE_TASK=C.CODE_TASK
             AND  C.CODE_ROLE=D.CODE_ROLE AND D.DBUSERNAME=USERNAME_VAR
             AND CODE_ORG_MONADA=:GLOBAL.CODE_TMHMA_VAR)
            LOOP
                  MENU_ID:=FIND_MENU_ITEM(Z.MENU_NAME);
               SET_MENU_ITEM_PROPERTY(MENU_ID,ENABLED,PROPERTY_TRUE);
               NEXT_RECORD;
            END LOOP;     
    END;     Regards ,
    Simon

  • Bean to load image item from URL?

    Can someone point me to a bean that will allow the loading of an image item from a URL?
    Cheers,
    Gary

    Here is the material:
    <p>
    the screen shot is here : http://sheikyerbouti.developpez.com/forms-pjc-bean/handleimage/getimage.png</p>
    <p>Get the jar file and the form module sample (9.0.2)</p>
    Notice that you could also download the image with the File_Transfert.URL_To_Client() Webutil function then load it with the Client_Read_Image_File() built-in.
    Francois

  • Populating Image Item

    Hello All
    I have a form with two items there
    1. an image item
    2. a button that will open a dialog box to choose a picture from there
    what will be the code behind this button?
    will the image item be populated with an image having extension other than BMP?
    Regards

    DECLARE
         tiff_image_dir VARCHAR2(80) := '/usr/staff/photos/';
         photo_filename VARCHAR2(80);
    BEGIN
         :System.Message_Level := '25';
         photo_filename := tiff_image_dir||LOWER(:scans.scan)||'.tif';
         READ_IMAGE_FILE(photo_filename, 'TIFF', 'emp.emp_photo');
         IF NOT FORM_SUCCESS THEN
         MESSAGE('This employee does not have a photo on file.');
         END IF;
         :SYSTEM.MESSAGE_LEVEL := '0';
         END;

  • Show image item from table into form's item.

    Hi Friends,
    My problem is:
    I have 1 table with 2 cols:
    eid number
    e_pict blob.
    I created a form (block based on this table). I'm able to show any valid image file stored in disk into e_pict (declared as image item) using the built_in READ_IMAGE_FILE. and also able to save it in the table test. But if I want to do the reverse process I mean retrieve the image from table's field to the image item of form, it creates problem. I even cannot compile the post_text_item trigger of eid:
    select e_pict into :test.e_pict
    from test
    where rtrim(eid)=rtrim(:eid);
    It is giving error:
    bad bind variable 'test.e_pict'
    Pls help me.
    Regards,
    Pragati.

    If I declare the image field as long raw instead of blob then also the same problem.
    I can save the image from file to database through a form but cannot retrieve an image from database to form.
    Pls help.
    Thanks in advance,
    Pragati.

  • Problem with dimension of an image loaded from a database

    Hi,
    I succeed in saving image in a MSAccess database with this code:
    Image img;
    image = new ImageIcon("d:\\prova\\comore.jpg");
    img=image.getImage();
    try{
    int[] pix = new int[img.getWidth(null) * img.getHeight(null)];
    PixelGrabber pg = new PixelGrabber(img, 0, 0, img.getWidth(this), img.getHeight(this), pix, 0, img.getWidth(this));
    pg.grabPixels();
    System.out.println(pix.length);
    byte[] pixels = new byte[img.getWidth(this) * img.getHeight(this)*4];
    for(int j=0;j<pix.length;j++){
    pixels[j] = new Integer(pix[j]).byteValue();
    String sql="insert into Immagini values ('1',?)";
    PreparedStatement ps = con.prepareStatement(sql);
    ps.setBytes(1,pix);
    ps.executeUpdate();
    }catch(Exception except){
    except.printStackTrace();
    then, I've load the image with this code:
    try{
    String query = "select * from Immagini where IDprog = 1";
    Statement s = con.createStatement();
    s.executeQuery(sql);
    ResultSet rs=s.getResultSet();
    rs.next();
    Viaggio vi = new Viaggio(rs.getInt(1),rs.getBytes(2));
    byte[] b=vi.getBytesImage();
    int[] intImage = new int[b.length];
    for(int j=0;j<b.length;j++){
    intImage[j]=(int)b[j];
    Image img = createImage(new MemoryImageSource(124,100,intImage,0,124));
    ImageIcon imgic = new ImageIcon(img);
    jLabel3.setIcon(imgic);
    }catch(Exception tps){
    tps.printStackTrace();
    All works correctly;
    but I've two problems:
    How do I do to take the dimension of the image from the byte array?
    infact in the code up written I've used 124 and 100 as image dimension;
    but I can have images of different dimension.
    The other problem is:
    Why in the image that is loaded are not the same number of colors of the image saved, but only a few, so that the image seems to be out of focus?
    Thank and excuse me for my english.
    I'm Italian.

    Noone can help me?
    Thank

  • Is it possible to write an image data from unix database to windows client?

    Hello Sir/Madam,
    My database Oracle 11g resides in UNIX.  I'm trying to find out if it is possible to pull binary data from unix database and write to a file on windows7 client ?
    if so, please share that insight?
    Regards,
    Vani Sonti

    Hi,
    if you use Oracle forms 10g+ you can use the webutil to do whatever you want between db server and client pc. There are numerous examples on the net, for example:
    Zeeshan Baig's Blog: Storing and Retrieving Images / Word / Excel / PDF and Movies in Oracle Database using Forms10g

  • [b] Populating List Box from MySQL Database[/b]

    Hi all,
    I'm trying to populate a JComboBox from MySQL database, I Have an applet which send's the query to a server through sockets on the localhost, but when i try to retrieve the result set from the MySQL database, i get an index out of bounds exception, It's probably something simple, any help regarding the above problem!! I've included the code below!!
    Cheers
    Dave
    java.lang.ArrayIndexOutOfBoundsException: 1
    at dbWrapper1.Select(dbWrapper1.java:97)
    at TestUpdateDB.main(TestUpdateDB.java:29)
    Applet Code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    *     @version  04/18/05
    *     @author David Lawless
    public class cust extends JApplet implements ActionListener
    //Declare Labels for Form
    private JLabel titleLabel;
    private JLabel firstNameLabel;
    private JLabel lastNameLabel;
    private JLabel addressLabel;
    private JLabel countyLabel;
    private JLabel countryLabel;
    //Declare Input fields for user
    private JTextField firstNameText;
    private JTextField lastNameText;
    private JTextField addressLineOneText;
    private JTextField addressLineTwoText;
    private JTextField addressLineThreeText;
    //Declare list for title box
    private JComboBox titleList;
    private String[] title = {"Mr.","Mrs.","Miss","Ms","Dr."};
    //Declare list for county box
    private JComboBox countyList;
    //Called when this applet is loaded into the browser.
    public void init()
    lookAndFeel();
    //Initialise Labels
    firstNameLabel = new JLabel("First Name * ");
    lastNameLabel = new JLabel("Last Name * ");
    titleLabel = new JLabel("Title * ");
    addressLabel = new JLabel("Address *");
    countyLabel = new JLabel("County *");
    countryLabel = new JLabel("Country *");
    //Initialise title List
    titleList = new JComboBox( title );
    titleList.setActionCommand("Title");
    //Set up Text fields
    firstNameText = new JTextField(30);
    firstNameText.setToolTipText("Please enter your first name here");
    lastNameText = new JTextField(30);
    lastNameText.setToolTipText("Please enter your surname here");
    addressLineOneText = new JTextField(30);
    addressLineTwoText = new JTextField(30);
    addressLineThreeText = new JTextField(30);
    //Retrieve County List From Database
    //countyList = new JComboBox( counties );
    try
         try
              Socket mySocket = new Socket ("127.0.0.1", 1983 );
              ObjectOutputStream out = new ObjectOutputStream(mySocket.getOutputStream());
              String entry1 ="SELECT county FROM data";
              out.writeObject(new String(entry1));
              ObjectInputStream in = new ObjectInputStream(mySocket.getInputStream());
              int size = in.readInt();
              Object [] results = new Object[size];
              for (int i=0; i < size  ; i++ )
                   results[i] = in.readObject();
              countyList = new JComboBox( results );
              countyList.setActionCommand("County");
              mySocket.close ();
         catch (Exception exp)
              exp.printStackTrace();
    // detect problems interacting with the database
    catch ( Exception sqlException )
         System.exit( 1 );
    //set up command buttons
    submitButton = new JButton("Submit");
    submitButton.setToolTipText("Click here to submit your details ");
    submitButton.addActionListener(this);
    cancelButton = new JButton("Cancel");
    cancelButton.setToolTipText("Click here to cancel order");
    cancelButton.addActionListener(this);
    Container topLevelContainer = getContentPane();
    getContentPane().setBackground(Color.blue);
    //Create Layout
    JPanel contentPane = new JPanel();
    //Set transparent background instead of blue
    contentPane.setBackground(Color.white);
    contentPane.setLayout(null);
    contentPane.setOpaque(true);
    titleLabel.setBounds(37,10,75,20);
    contentPane.add(titleLabel);
    firstNameLabel.setBounds(93,10,100,20);
    contentPane.add(firstNameLabel);
    lastNameLabel.setBounds(198,10,100,20);
    contentPane.add(lastNameLabel);
    titleList.setBounds(37,35,50,20);
    contentPane.add(titleList);
    firstNameText.setBounds(93,35,100,20);
    contentPane.add(firstNameText);
    lastNameText.setBounds(198,35,100,20);
    contentPane.add(lastNameText);
    addressLabel.setBounds(37,65,100,20);
    contentPane.add(addressLabel);
    addressLineOneText.setBounds(37,90,125,20);
    contentPane.add(addressLineOneText);
    addressLineTwoText.setBounds(37,115,125,20);
    contentPane.add(addressLineTwoText);
    addressLineThreeText.setBounds(37,140,125,20);
    contentPane.add(addressLineThreeText);
    countyLabel.setBounds(37,165,100,20);
    contentPane.add(countyLabel);
    countyList.setBounds(37,190,100,20);
    contentPane.add(countyList);
    submitButton.setBounds(60,250,100,20);
    contentPane.add(submitButton);     
    cancelButton.setBounds(180,250,100,20);
    contentPane.add(cancelButton);
    topLevelContainer.add(contentPane);
    }//End init()
    static void lookAndFeel()
         try
              UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         catch(Exception e)
    }//End look and feel method
    public synchronized void actionPerformed(ActionEvent e)
    String actionCommand = e.getActionCommand();
    if (e.getSource() instanceof JButton)
         if (actionCommand.equals("Cancel"))
                   int returnVal = JOptionPane.showConfirmDialog(null,
                        "Are you sure you want cancel and discard your order?",
                        "Cancel Order", JOptionPane.YES_NO_OPTION);
                   if(returnVal == JOptionPane.YES_OPTION)
                        System.exit(0);
         if (actionCommand.equals("Submit"))
              firstName = firstNameText.getText();
              Surname = lastNameText.getText();
         }//end action command for submit button
    }//end method actionperformed
    }//End class customerDatabase Connection Code:
    import java.sql.*;
    import java.util.*;
    class dbWrapper1
        private Statement statement;
        private Connection connection;
        private String strUserName;
        private String strPassword;
         Object [] results = null;
         static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
         static final String DATABASE_URL = "jdbc:mysql://localhost:3306/ecommerce";
        public dbWrapper1()
            // the DSN for the Db connection
            strUserName = "root";
            strPassword = "password";
        public void Open()
            try
                // Load the jdbc-odbc bridge driver
                Class.forName ( JDBC_DRIVER );
                   //                    ***** TESTING PURPOSES *****
                   //Check currently loaded drivers
                   System.out.println("Currently loaded drivers...");   
                   for
                        Enumeration enum1 = DriverManager.getDrivers() ;
                        enum1.hasMoreElements();
                   System.out.println(enum1.nextElement().getClass().getName());
                // Attempt to connect to a driver.
                connection = DriverManager.getConnection ( DATABASE_URL, strUserName, strPassword );
                // Create a Statement object so we can submit
                // SQL statements to the driver
                statement = connection.createStatement();
            catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
            catch (java.lang.Exception ex)
                ex.printStackTrace ();
        public void Update( String strUpdate )
            try
                // Submit an update or create
                statement.executeUpdate( strUpdate );
              catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
        public Object[] Select( String strQuery )
            try
                // Submit a query, creating a ResultSet object
                ResultSet resultSet = statement.executeQuery( strQuery );
                // process query results
                   ResultSetMetaData metaData = resultSet.getMetaData();
                   int numberOfColumns = metaData.getColumnCount();
                   results = new Object[numberOfColumns];
                   while ( resultSet.next() )
                        for ( int i = 1; i <= numberOfColumns; i++ )
                             results[i] = resultSet.getObject(i);
                             System.out.print(resultSet.getString(i) + " | " );
                        System.out.println();
                   resultSet.close();
            catch (SQLException ex)
                while (ex != null)
                    System.out.println ("SQL Exception:  " + ex.getMessage () );
                    ex = ex.getNextException ();
              for (int i=0;i<results.length ;i++ )
                   System.out.println(results);
              return results;
    public void Close()
    try
    statement.close();
    connection.close();
    catch (SQLException ex)
    while (ex != null)
    System.out.println ("SQL Exception: " + ex.getMessage () );
    ex = ex.getNextException ();
    Server Code:
    import java.io.*;
    import java.net.*;
    public class TestUpdateDB
         public static void main(String[] args)
              System.out.println ( "Server is active" );
              try {
              ServerSocket sock = new ServerSocket ( 1983 );
              while ( true )
                   try
                        Socket mySock = sock.accept();
                        ObjectInputStream iStream = new ObjectInputStream(mySock.getInputStream());
                        ObjectOutputStream oStream = new ObjectOutputStream(mySock.getOutputStream());
                        Object temp = iStream.readObject();
                        String entry = (String)temp;
                        System.out.println ( entry );
                        dbWrapper1 myDB = new dbWrapper1();
                        myDB.Open();
                        Object [] query = myDB.Select(entry);
                        int size = query.length;
                        oStream.writeInt(size);
                        for (int i=1 ; i <= query.length ; i++)
                             oStream.writeObject( query );
                        myDB.Close();
                   catch ( Exception exp )
                        exp.printStackTrace ();
              catch ( Exception exp ) {
                exp.printStackTrace();

    Sir,
    The exception is probably in here.
    for ( int i = 1; i <= numberOfColumns; i++ ){
      results[i] = resultSet.getObject(i);
      System.out.print(resultSet.getString(i) + " | " );
    }ResultSet counting begins with 1 but array indexing begins with 0 your code should look more like.
    for ( int i = 0; i <= numberOfColumns; i++ ){
      results[i] = resultSet.getObject(i+1);
      System.out.print(resultSet.getString(i+1) + " | " );
    }Sincerely,
    Slappy

  • Populating Drop down from Oracle Database

    Can someone please help me!
    I am trying to populate a drop down list in a JSP from an Oracle database. Basically the JSP gets the user, outputs their name and then should display a drop down for them with some values in it!
    However, I seem to be getting a drop down box for each option rather than one drop down with every option from the database;
    Here is my code!
    <html>
    <head>
    <title>JDBC and JSP</title>
    </head>
    <body bgcolor="#FDF5E6">
    <h1 align="center">Welcome to Student Sigon Page!!</h1>
    <%@ page import="java.sql.*" %>
    <%@ page import= "java.util.*"%>
    <%@page import= "java.io.*" %>
    <%
    //String driverClassString = "oracle.jdbc.driver.OracleDriver";
    //String driverConnectString = "jdbc:oracle:thin:@172.17.106.78:1521:globaldb";
    //String username = "system";
    //String password = "manager";
    %>
    <table>
    <tr>
    </tr>
    <%
    Connection conn = null;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@Midas2:1521:globaldb", "system", "manager");
    catch (Exception e) {
    out.println("Cannot close connect to database!"+e);
    if (conn != null) {
    String login = request.getParameter("username").trim();
    String pswd = request.getParameter("password").trim();
    String sqlQuery;
    if (login !="")
    if (pswd != ""){
    sqlQuery = ("SELECT familyname, givenname FROM STUDENTINFO WHERE username='"+login+"' AND password='"+pswd+"'");
    try { // execute the query
    Statement stmt = conn.createStatement();
    ResultSet rst;
    rst = stmt.executeQuery(sqlQuery);
    // Fetch the query result, and dispaly them in a table
    while (rst.next()) {
    %>
    <tr>
    <td> Family Name:<%= rst.getString("familyname") %> </td><tr>
    <td> Given Name:<%= rst.getString("givenname") %> </td><tr>
    <tr>
    <tr>
    </tr>
    <%
    stmt.close();
    } catch(Exception e) {
         out.println("Cannot fetch data from database!"+e);
    %>
    <%
    String sqlQuery2;
    sqlQuery2 = ("SELECT code,title FROM TMPOffering");
    try { // execute the query
    Statement stmt = conn.createStatement();
    ResultSet rst2;
    rst2 = stmt.executeQuery(sqlQuery2);
    while (rst2.next()) {
    %>
    <tr>
    <td width="20%">Session ID</td>
    <td width="80%"><select size="1" name="Course1">
    <option value=<%=rst2.getString("code")%>><%= rst2.getString("title") %>/option>
    <select>
    </td>
    </tr>
    </tr>
    <%
    stmt.close();
    catch(Exception e) {
    out.println("Cannot fetch data from database!"+e);
    %>
    </table>
    </body></html>

    Replace
    while (rst2.next()) {
    %>
    <tr>
    <td width="20%">Session ID</td>
    <td width="80%"><select size="1" name="Course1">
    <option value=<%=rst2.getString("code")%>><%= rst2.getString("title") %>/option>
    <select>
    </td>
    </tr>
    </tr>
    <%
    }with
    <tr>
    <td width="20%">Session ID</td>
    <td width="80%"><select size="1" name="Course1">
    <%
    while (rst2.next()) {
    %>
    <option value=<%=rst2.getString("code")%>><%= rst2.getString("title") %>/option>
    </td>
    </tr>
    </tr>
    <%
    </select>
    %>-Bharat

  • How do i set the transparency of an image retrieved from a database? (image was stored as blob)

    I had stored a png image into a database, when i retrieve it and display it the background is no longer transparent?
    I am loading the blob returned from the select statement by using the "loadBytes" method of the "UILoader" class.
    Thanx in advance
    gv1979

    If you want to stick with adjusting the scale you can do this two ways. Edit the value graph or edit the speed graph.
    The problem is that a camera move, a zoom or a dolly in, is not linear and scale is. This means the graphs are not a good representation of what you'll see visually. This makes them hard to use. At a constant rate for scale the appearance is that the increase in size slows down to closer you get to the final value. In other words, as you scale an object up at a constant rate, the visual appearance is a gradual slowing.
    A speed graph edited to look like this gives the appearance of a constant rate scale of the layer when you expect an acceleration at the end. There's just not enough granularity in the graph editor or enough control to predictably achieve the results you want.
    You'll have better luck editing the value graph to look something like this:
    While this looks extreme, you will get closer to achieving the results you want using the value graph. Once again, the amount of control and the resolution of the graph combined with the visual tomfoolery that scaling an object brings with it makes this a difficult way to achieve predictable results.
    You select the graph you'll edit by clicking on the second icon from the left.
    As I said before, you'll have much better luck getting the look you want if you make the layer 3D and move a camera toward it.

  • Populating List Item From View

    I have two data blocks in my form, one named USERS which contains updateable fields to a table from the view and another data block called CONTROL which are all list items that currently populate on a WHEN-MOUSE-CLICK trigger. The list items work as expected for the WHEN-MOUSE-CLICK trigger. However, my problem is trying to populate the list items based on a selection previously chosen and saved to the table (yes, the values are in the table and are selectable through the view). I have a seperate population for this occurrance in the WHEN-NEW-FORM-INSTANCE at the form level, as well as on KEY-SCRUP, KEY-SCRDOWN, WHEN-NEW-RECORD-INSTANCE, and POST-QUERY at the USERS data block level. The only way the list items populate on a previously chosen and saved value is if you choose (WHEN-MOUSE-CLICK trigger) the list of values and save. From then on, as I scroll through the data retrieved in the USERS data block the corresponding data in the users view shows up in the CONTROL block list items. How do I get my form to initially show the corresponding list item data on form load when it is already in a WHEN-NEW-FORM-INSTANCE and POST-QUERY trigger on form load?
    Thanks in advance for any clue to point me in the right direction.
    Kyle
    Edited by: Kyle Miller on Sep 29, 2008 3:09 PM

    The form is for editing a current student information system user who we will be extracting data for an OBIEE IDM import. All of the fields displayed in the OBIEE_USERS data block can be edited. For the CONTROL block list items I would like them to display the current value chosen for the user displayed in the OBIEE_USERS data block. When the CONTROL block list items are clicked on then a list of values are displayed in which the logged in form user can chose another value which ultimately changes the choice for the user displayed in the OBIEE_USERS data block. This all works fine in my current form except the list items do not display the current user selected in the OBIEE_USERS data block's saved value until the list item is selected, a value chosen, and a save is committed to the table tied to the OBIEE_USERS data block. From that point I can scroll through the OBIEE_USERS block and the list item displays the correct value for the selected user, if there are values (some users have NULL values). I have currently worked around this issue by displaying the fields in the OBIEE_USERS block and only use the list items for the changing selection. I did this because I needed a proof of concept for the pilot roll-out and could no longer wait to figure this issue out (it should be more simple it seems). I am still interested in resolving this as I feel it is a great functionality for the form.

  • How to fetch the image file from oracle database and display it.

    hi... i've inserted the image file into the oracle database... now i want to retreive it and want to display it... can anybody help me... pls

    not a big deal dude... i fetched the image from database and saved it into my local hard disk.. but when tried to open it,ends up with no preview... dont know what d prob is... any idea... i've inserted the image as bytes n trying to fetch it as binary stream.. is that the problem... here im giving my insertion and retireving code.. jus go through it...
    Insertion 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("E:/vanabojanalu-/DSC02095.JPG");
    FileInputStream fs = new FileInputStream(file);
    System.out.println("lenth of file"+file.length());
    byte blob[]=new byte[(byte)file.length()];
    System.out.println("lenth of file"+blob.length);
    fs.read(blob);
    ps.setString(1,"E:/vanabojanalu-/DSC02095.JPG");
    ps.setBytes(2, blob);
    // ps.setBinaryStream(2, fs,(int)file.length());
    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();
    and Retrieving code is:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package PMS;
    import java.beans.Statement;
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.jdbc.OracleResultSet;
    * @author Administrator
    public class view_image2 extends HttpServlet {
    * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("image/jpeg");
    //PrintWriter out = response.getWriter();
    try
    javax.servlet.http.HttpServletResponse res=null;;
    int returnValue = 0;
    Connection con = null;
    PreparedStatement stmt = null;
    ResultSet rs = null;
    InputStream in = null;
    OutputStream os = null;
    Blob blob = null;
    //String text;
    //text=request.getParameter("text");
    //Class.forName("com.mysql.jdbc.Driver");
    con=new PMS.DbConnection().getConnection();
    System.out.println("jus entered the class");
    //String query = "SELECT B_IMAGE FROM img_exp where VC_IMG_PATH=?";
    //conn.setAutoCommit(false);
    PreparedStatement pst = con.prepareStatement("select b_image from img_exp where vc_img_path=?");
    System.out.println("before executing the query");
    pst.setString(1,"C:/Documents and Settings/Administrator/Desktop/Leader.jpg");
    rs = pst.executeQuery();
    //System.out.println("status of result set is"+rs.next());
    System.out.println("finished writing the query");
    int i=1;
    if(rs.next())
    System.out.println("in rs") ;
    byte[] byte_image=rs.getBytes(1);
    // byte blob_byte[]= new byte[(byte)blob.length()];
    //System.out.println("length of byte is"+blob_byte);
    //String len1 = (Oracle.sql.blob)rs.getString(1);
    //System.out.println("value of string is"+len1);
    //int len = len1.length();
    //byte [] b = new byte[len];
    //in = rs.getBinaryStream(1);
    int index = in.read(byte_image, 0, byte_image.length);
    System.out.println("value of in and index are"+in+" "+index);
    FileOutputStream outImej = new FileOutputStream("C://"+i+".JPG");
    //FileOutputStream fos = new FileOutputStream (imgFileName);
    BufferedOutputStream bos = new BufferedOutputStream (outImej);
    //byte [] byte_array = new byte [blob_byte.length]; //assuming 512k size; you can vary
    //this size depending upon avlBytes
    //int bytes_read = in.read(blob_byte);
    bos.write(index);
    /*while (index != -1)
    outImej.write(blob_byte, 0, index);
    index = in.read(blob_byte, 0, blob_byte.length);
    //System.out.println("==========================");
    //System.out.println(index);
    //System.out.println(outImej);
    //System.out.println("==========================");
    /*ServletOutputStream sout = response.getOutputStream(outImej);
              for(int n = 0; n < blob_byte.length; n++) {
                   sout.write(blob_byte[n]);
              sout.flush();
              sout.close();*/
    outImej.close();
    //i++;
    else
    returnValue = 1;
    catch(Exception e)
    System.out.println("SQLEXCEPTION : " +e);
    finally {
    //out.close();
    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    * Handles the HTTP <code>GET</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    * Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    * Returns a short description of the servlet.
    public String getServletInfo() {
    return "Short description";
    // </editor-fold>
    }

  • Can I extract images/items from a pdf?

    I lost my hard drive! (D'oh!)
    But I do have some hi-res pdf files made from the original files (InDesign).
    Is it possible to extract discrete components from pdfs? Such as images, text blocks, etc?
    It seems like it should be possible, but I'm wondering if one must be a PostScript coder or somesuch.
    Cheers!
    ~Ben

    Excellent! Thank you both, George and Steve.
    I have CS3, so v8.3.1 or Acrobat. So that process is Advanced > Document Processing > Export all images.
    Oddly, it tells me that it can't extract/export vector images. I suppose that means AS SUCH, since it managed to export JPEG versions of images that I know were .eps format. Strange, but true!
    Thanks again!
    Ben

Maybe you are looking for

  • Automatically create and sort into subfolders

    Hi, I have a large folder directory with a lot of photos in them. Basically something like Clouds Cloud_01 Cloud_02 etc. Trees Tree_01 Tree_02 Each subfolder has both .jpg and .cr2 (raw) files in them I'd like to be able to run a script or automator

  • System Lanscape Directory : how change URL for Web AS Java ?

    Hi, In the SLD Administration (http://sapcm.company.com:8001/sld) in the menu "Technical Systems", my WEB AS java has a wrong URL : msapcm:50100. Where can I change this URL to have sapcm.company.com:50100 ? I think is the same problem when I develop

  • Stage follows MC

    im looking to create a flash movie where the user selects 4 different menu options, each option will load/attach a different MC. now what im trying to do is when the MC is attached there is a path inside the stage with a upwards motion. what I want i

  • Save for web - not at 100% original image size

    Alright... So... I'm dropping some images into Star Office Writer, noticed they looked a little small. Created a 1" x 1" square, saved for web, dropped it into Writer and the picture info. states it as being at .77" square (23% smaller). Same when I

  • Esx24 sampler won't read my files or aliases..

    the esx24 won't read audio alisases from my sampler instrument folder. it doesn't matter whether the original file is saved on my desktop or and external drive. tech support seems to think it's a logic configuraton problem. can anyone help?