Problem displaying Blob column as an image

Hi all,
Ik have created an attribute (as part of an Entity Object and a View object) on top of a blob column.
With JHeadstart I generated one insert group (display type fileUpload) and one query group (display type image).
I managed to upload (and store) pictures.
However when I query the pictures the folowing occurs:
1. when I scroll through the records the first time the picture is shown OK
2. the secod time when I scroll through the same dataset the picture is not shown...
3. when I restart the pageGroup, the pictures are shown..
Do you have any suggestions?

A fix has been found, see the thread at Why the image only show first time?? for details.
kind regards,
Sandra Muller
JHeadstart Team

Similar Messages

  • Help! Problem Updating Blob Columns

    Good day
    Please i have problems updating Blob columns storing images and doc files. can someone put me through the way out hassle free
    Thank You
    God Bless U all
    Femi

    I keep geting this error
    java.sql.SQLException: ORA-01729: database link name expected
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1169)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
    when ever i try to update The Blob colum with a Blob object retrieved by resultset.getBlob from another Blob column of a different table.
    Blob b = rset.getBlob(1);
    String x = (String)jComboBox2.getSelectedItem();     
         ps=c.prepareStatement("UPDATE PROPERTIES SET "+x+" = "+b+" WHERE NAME = ?");
         ps.setString(1, (String)jComboBox1.getSelectedItem());
         System.out.println("success");
         ps.executeUpdate();

  • Problem with blob column index created using Oracle Text.

    Hi,
    I'm running Oracle Database 10g 10.2.0.1.0 standard edition one, on windows server 2003 R2 x64.
    I have a table with a blob column which contains pdf document.
    Then, I create an index using the following script so that I can do fulltext search using Oracle Text.
    CREATE INDEX DMCS.T_DMCS_FILE_DF_FILE_IDX ON DMCS.T_DMCS_FILE
    (DF_FILE)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('DATASTORE CTXSYS.DEFAULT_DATASTORE');
    However, the index is not searchable and I check the following tables created by database for my index and found them to be empty as well !!
    DR$T_DMCS_FILE_DF_FILE_IDX$I
    DR$T_DMCS_FILE_DF_FILE_IDX$K
    DR$T_DMCS_FILE_DF_FILE_IDX$N
    DR$T_DMCS_FILE_DF_FILE_IDX$R
    I wonder what's wrong with it.
    My user has been granted the ctx_app role and I have other tables that store plain text which I use Oracle Text are fine. I even output the blob column and save as pdf file and they are fine.
    However the database seems like not indexing my blob column although the index can be created without error.
    Please advise.
    Really appreciate anyone who can help.
    Thank you.

    The situation is I have already loaded a few pdf document into the table's blob column.
    After I create the Oracle text index on this blob column, I find the system generated index tables listed in my earlier posting are empty, except for the 4th table.
    Normally we'll see words inside the table where those are the words indexed by oracle text on my document.
    As a result, no matter how i search for the index using select statement with contains operator, it will not give me any result.
    I feel weird why the blob is not indexed. The content of the blob are actually valid because I tested this by export the content back to pdf and I can still view and search within the pdf.
    Regards,
    Jap.

  • Problem displaying the number 8 (see image)

    Hi All!
    Has anyone seen this happen?
    This image is from safari, but the same thing happens in Firefox:
    here is another example, this one from Fetch (the file should be 8error):
    Any ideas on this?
    Thanks!
    Message was edited by: vinnieg

    Look like a bad video card. Are you eligible for Apple's Repair extension programs?

  • Problem retrieving BLOB column

    I'm using PB 12.5.1 / DB2 Version 10 / ODBC driver
    When executing this embedded SQL Statement in the application, I'm getting a popup window asking me to "Select Data Source"
    SELECTBLOB BLOB_OBJECT
    INTO :LB_TEST
    FROM BLOB_TABLE
    WHERE BLOB_NAME = 'BANANA.JPG'
    Having the user manually select the ODBC DataSource from within the application is not an option for us.
    I also tried with "USING SQLCA", that didn't make any difference.
    Is there any specific transaction object/parameters that need to be defined for SELECTBLOB ?
    thanks
    Ganesh

    Hi Ganesh;
       This problem can be caused by:
    a) Improper settings in the SQLCA transaction object for your DBMS.
    b) Missing or miss-matched DSN
    c) DSN is not a SYSTEM defined DSN.
    d) DSN is not configured properly.
    HTH
    Regards .... Chris

  • Problem displaying two columns in JCombobox using EnumerationBinding

    I am using a JComboBox with an EnumerationBinding where I selected two attributes to be displayed in the combobox. But, it displays the first one only.
    I am using jDeveloper 9.0.3 version(latest version).
    The code is as follows.
    public void jbinit(){
    JComboBox cb = new JComboBox();
    cb.setModel(JUComboBoxBinding.createNavigationBinding(panelBinding, cb, "RecPositionView", null, "RecPositionViewIter", new String[]{"Code", "Descr"}, null, null));
    The combobox only displays the code but I want the combobox to display the code as well as the Descr. Does anyone know how to do it?
    Thanks in advance.
    Urmila

    The combobox only displays the code but I want the combobox to display the code as well as the Descr. Does anyone know how to do it?
    You're running into a known bug 2610954.

  • Displaying BLOB image in an item

    I have a table with a BLOB column holding an image.
    I can set up a report region with a query on the column like this (the whole sql query is omitted for simplicity, I am just showing relevant column):
    dbms_lob.getlength(a.product_logo)
    and then put a mask on the report column:
    IMAGE:PROJECT:PRODUCT_LOGO:PROJECT_ID::::::inline:Download
    and it works. The report region, when ithe page runs, displays the image.
    My problem is this...
    I am trying to set up a page where I already have an html region serving other purposes. I want to set up an item under that region that would display my image. I create an item of "Display As Text" type.
    I then enter my magic query dbms_lob.getlength(a.product_logo) into the item's "Source value or expression" field, while I set the "Source type" to "SQL Query". In the format mask for the item, I enter the same mask I showed above - "IMAGE:PROJECT:PRODUCT_LOGO:PROJECT_ID::::::inline:Download".
    I run the page and it doesn't work. The item comes back with a number. I am guessing it's the actual getlength value. What else am I missing? Or is it even possible to display an image BLOB through an item and not a report column?
    Thanks
    Boris

    Hi,
    Install demonstrative application and check page 6
    To install demonstrative app go
    Home>Application Builder>Create
    and select Demonstration Application
    Br,Jari

  • BLOB column's image is not showing up in Forms

    Hi All,
    I am using Forms 10g. I created a default form (using wizard) for a table that has a BLOB column. Form builder automatically created an image item that corresponds to the BLOB column. The problem is that when I run the, the image item is always blank, and is not showing any image. Although I know that the BLOB column contains valid images, which I can see using PL/SQL developer tool.
    The form is compiling without error, and also, there is no runtime error message. So without reporting a compile time/runtime error, the Form is not showing the image. Can anybody help me plz??? this is urgent, any help will be greatly appreciated.
    Thanks in Advance.

    Hi,
    I am simply using the Forms default "EnterQuery" and "ExecuteQuery" buttons. I have not written a single line of code. That is, just using the forms default funcionality.
    Thanks.

  • Images in Blob Column..

    Hi
    I have a function that retrieves the blob column which has the image data. I cannot view this from Toad and get the value {hugeBLOB} when I query via Toad.
    I used it in a VB.Net app, but I'm unable to reterive the image there also. Can you please suggest how I can retrieve blob column (which has images) into a .jpg format? I need to retreive the images based on the query.
    Thanks for all suggestions.
    ASR

    Hi,
    Your question is not according to Forum. You must post your thread (for immediate response) on Oracle Forum for Dot Net/VB Forum.
    But i'm going to accept your request.
    I've inserted/ saved image in oracle 9i database. And As well i've read/displayed image into Picture Control from Oracle9i database.
    But i've used C# Dot Net (Visual Studio 2005 Professional) as front hand tool.
    Sorry for VB. One thing IMPORTANT:
    I'm going mention code in C# you can Covert into VB Dot Net. Through Online FREE Compiler(www.developerfusion.co.uk/ and click on utilities.)
    --------------------------------Here Below is C# Code ----------------------------------------------------
    Con.Open();
    string myquery = "Select Form_id,Emp_image From Employee where Form_id=2840";
    OracleCommand cmd = new OracleCommand(myquery, con);
    OracleDataReader dr = cmd.ExecuteReader();
    Boolean recordExist = dr.Read();
    if (recordExist)
    //Now displaying Picture.
    MessageBox.Show("Pic is being loaded by C#. Now");
    OracleLob blob = dr.GetOracleLob(1); //Column #, Emp_image
    Byte[] BLOBData = new Byte[blob.Length];
    //Read blob data into byte array
    int i = blob.Read(BLOBData, 0, System.Convert.ToInt32(blob.Length));
    //Get the primitive byte data into in-memory data stream
    MemoryStream stmBLOBData = new MemoryStream(BLOBData);
    //LOADING INTO PICBOX1
    Picbox1.Image = Image.FromStream(stmBLOBData);
    MessageBox.Show("Now i'm reseting it.");
    Picbox1.SizeMode = PictureBoxSizeMode.StretchImage;
    Else
    MessageBox.Show("Reocrd not found against this id.");
    Hopefully it helps you. If it is still difficult to understand don't shy to make query.
    ---

  • Displaying BLOB.

    Hi all,
    I want to create blob column to save my images in to display it later on in
    the report ,so i did the following
    Create directory first ....
    CREATE OR REPLACE DIRECTORY images AS 'C:\';
    ============================================
    create the table .....
    CREATE TABLE tab1 (col1 BLOB);
    ============================================
    create a procedure to fill the blob column with the images
    DECLARE
    l_bfile BFILE;
    l_blob BLOB;
    BEGIN
    INSERT INTO tab1 (col1)
    VALUES (empty_blob())
    RETURN col1 INTO l_blob;
    l_bfile := BFILENAME('IMAGES','Ahmed.gif');
    DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
    DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
    DBMS_LOB.fileclose(l_bfile);
    COMMIT;
    end;
    now what I want to do is ,
    how can i display this picture in the report in the application express from the database ????
    Thanks in advance
    Ahmed,

    HTML DB Version - 1.3 (i am not sure) don't have access right now to check the
    same but it was the age old html db version
    Database Version - 9.2.0.5
    OS - Win NT Server (SP-2)
    Hi,
    I was trying to develop an application in HTMLDB where based upon the user
    choice program will show up the images.
    i have 3 tabs , Home /Display and About.
    In Home page user will select their favourite comics (say) Asterix and
    Cleopatra. Now as soon as user clicks go button application will move to display
    page where 1st page of the comics will be shown. It will also have next and
    previous option based upon the user selection.
    Right now whenver user selects and submit their request the system displaying
    the requested page. But the problem here is i am not getting the standard header
    and footer of the page. The images taking up the whole screen and even i am not
    getting next and previous button too.
    The images has been saved as a BLOB in database.
    I think their is some problem from the HTML DB point of view where i might have
    to clarified my HTML region settings.
    Need some advice on this.
    Regards,
    Tanmoy

  • How to upload a file to a BLOB column in the DB using PL/SQL???

    Hi
    I am trying to upload a file to a BLOB column in my database. I wana do this using some pl/sql procedure.I don't wana use webutil. is it possible??? and if so can anybody help me with this???
    Regards
    Shiraz

    Hello,
    This is a stored procedure sample that show how insert into CLOB, BLOB and BFILE columns
    CREATE OR REPLACE PROCEDURE Insert_document
         PC$Type IN DOCUMENT.TYP%TYPE
        ,PC$Nom IN DOCUMENT.NOM_DOC%TYPE
        ,PC$Texte IN VARCHAR2
        ,PC$Image IN VARCHAR2 
        ,PC$Fichier IN VARCHAR2
       ) IS
      L$Blob BLOB;
      L$Clob CLOB;
      L$Bfile BFILE;
      LN$Len NUMBER := dbms_lob.lobmaxsize;
      LN$Num NUMBER ;
      LN$src_off PLS_INTEGER := 1 ;
      LN$dst_off PLS_INTEGER := 1 ;
      LN$Langctx NUMBER := dbms_lob.default_lang_ctx ;
      LN$Warn NUMBER;
      BEGIN
        -- Création of new raw --
        If PC$Fichier is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Fichier );
        End if ;
        -- Creation of temporary objetcs --
        dbms_lob.createtemporary( L$Clob, TRUE ) ;
        dbms_lob.createtemporary( L$Blob, TRUE ) ; 
        -- Loading text in CLOB column --
        If PC$Texte is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Texte );
           dbms_lob.fileopen(L$Bfile, dbms_lob.file_readonly);
           If dbms_lob.fileexists( L$Bfile ) = 1 Then
             dbms_output.put_line(PC$Texte || ' open' ) ;
             dbms_lob.loadclobfromfile(
                                       L$Clob,                -- Destination CLOB
                                       L$Bfile,               -- Source file pointer
                                       LN$Len,                -- # bytes to read
                                       LN$src_off,            -- Source start position
                                       LN$dst_off,            -- Target start position
                                       dbms_lob.default_csid, -- CSID
                                       LN$Langctx,            -- Language Context
                                       LN$Warn);              -- Warning message
             dbms_lob.fileclose(L$Bfile);
          Else
             raise_application_error( -20100, 'Erreur ouverture ' || PC$Texte ) ;
          End if ;
        End if ;
        -- Loading image in BLOB column --
        If PC$Image is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Image );
           dbms_lob.fileopen(L$Bfile, dbms_lob.file_readonly);
           dbms_lob.loadblobfromfile(
                                     L$Blob,       -- BLOB de destination
                                     L$Bfile,      -- Pointeur de fichier en entrée
                                     LN$Len,       -- Nombre d'octets à lire
                                     LN$src_off,   -- Position source de départ
                                     LN$dst_off);  -- Position destination de départ
           dbms_lob.fileclose(L$Bfile);
        End if ; 
        -- Save --
        Insert into DOCUMENT (ID, NOM_DOC, TYP, UTILISE, LOB_TEXTE, LOB_DATA, LOB_FICHIER)
               Values( SEQ_DOCUMENT.NEXTVAL, PC$Nom, PC$Type, NULL, L$Clob, L$Blob, L$Bfile ) ; 
        -- Free the temporary objects --
        dbms_lob.freetemporary( L$Clob ) ;
        dbms_lob.freetemporary( L$Blob ) ; 
      END;
    /The table structure for this sample is the following:
    CREATE TABLE DOCUMENT (
      ID           NUMBER (5) PRIMARY KEY,
      TYP          VARCHAR2 (20),
      UTILISE      VARCHAR2 (30),
      LOB_TEXTE    CLOB,
      LOB_DATA     BLOB,
      LOB_FICHIER  BFILE,
      NOM_DOC      VARCHAR2 (100))
    /Francois

  • Display BLOB (image) column in (interactive) report

    Hi,
    I have a field called "picture" in my table "details" which is of type BLOB. i also have a field for "MIMETYPE" and "filename"
    i additionally have a "name" and "description" columns which i need to display along with the picture as columns in a report (preferably interactive).
    i have also modified the BLOB display format as per
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    what i am missing is the correct query. if possible, i would like to control the size of the picture rendered within the report like say 40*50.
    I have also referred to the thread
    APEX 3.1 Display BLOB Image
    But i don't know how to place the
    dbms_lob.getlength("BLOB_CONTENT") as "BLOB_CONTENT"
    in my query.
    The above also makes the report column as of type "number". is this expected?
    Any help would be much appreciated.
    Regards,
    Ramakrishnan

    You haven't actually said what the problem is?
    >
    I have a field called "picture" in my table "details" which is of type BLOB. i also have a field for "MIMETYPE" and "filename"
    i additionally have a "name" and "description" columns which i need to display along with the picture as columns in a report (preferably interactive).
    i have also modified the BLOB display format as per
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    what i am missing is the correct query.
    I have also referred to the thread
    APEX 3.1 Display BLOB Image
    But i don't know how to place the
    dbms_lob.getlength("BLOB_CONTENT") as "BLOB_CONTENT"
    >
    Something like:
    select
              name
            , description
            , dbms_lob.getlength(picture) picture
    from
              details
    if possible, i would like to control the size of the picture rendered within the report like say 40*50.For images close to this size it's easy to do this for declarative BLOB images in interactive reports using CSS. Add a style sheet with:
    .apexir_WORKSHEET_DATA td[headers="PICTURE"] img {
      display: block;
      width: 40px;
      border: 1px solid #999;
      padding: 4px;
      background: #f6f6f6;
    }where the <tt>PICTURE</tt> value in the attribute selector is the table header ID of the image column. Setting only one dimension (in this case the width) scales the image with the correct aspect ratio. (The border, padding and background properties are just eye candy...)
    However, scaling large images in the browser this way is a huge waste of bandwidth and produces poorer quality images than creating proper scaled down versions using image tools. For improved performance and image quality, and where you require image-specific scaling you can use the database ORDImage object to produce thumbnail and preview versions automatically, as described in this blog post.

  • Problem displaying PDF stored in BLOB column

    Hello everyone.
    I've been trying to follow this tutorial http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::p11_question_id:232814159006 on displaying PDFs stored in BLOB columns. This is being performed on Apex 4.2, with my DB running 11g. I've got my procedure, which I'll post below:
    create or replace procedure "PDF" (p_id IN gvo_documents.doc_id%type)
    is
        l_lob    blob;
        l_amt    number default 30;
        l_off   number default 1;
        l_raw   raw(4096);
    begin
        select contents into l_lob
            from gvo_documents
             where doc_id = p_id;
    -- make sure to change this for your type!
        owa_util.mime_header( 'application/pdf' );
        begin
            loop
              dbms_lob.read( l_lob, l_amt, l_off, l_raw );
              htp.prn( utl_raw.cast_to_varchar2( l_raw ) );
              l_off := l_off+l_amt;
              l_amt := 4096;           
        end loop;
            exception
               when no_data_found then
                  NULL;
            end;
    end;
    I am trying to run this through a PL/SQL dynamic region and while I don't receive any error's, the content displayed is a huge mess of garbled text and odd characters. I've tried to run this procedure on numerous other document types, including word files and jpeg images, all with the necessary changes in my procedure, and regardless of what I use, I still get a large mess of strange characters. Does anyone have any information or ideas about why this is happening?

    If I understand correctly, your requirements needs to be broken down into two problems:
    1) click link that pops up a window displaying a new APEX page
    2) an APEX page the displays the document, not downloads it.
    I haven't done #1 (yet).
    However, you may be able to generate a URL that points to the new page as part of the SELECT statement for the Report.
    This has a related question, but no answer yet:
    open pdf in popup browser window
    The key is target="_blank" for the anchor tag.
    To generate the URL, you should use the APEX_UTIL.prepare_URL() function.
    If that doesn't work, a Dynamic Action that does some magical JavaScript stuff may be needed.
    For #2, I lost the URL that showed how to display a PDF as part of a "form" page.
    From what I remember:
    Start with a blank page with one blank HTML region (all the Items go in the HTML region)
    Add an Item for the PK/Doc_ID
    part I forgot Create a Data Manipulation Process
    - Automated Row Fetch
    - On Load - After Header
    - (stuff for your table/view)
    part I forgot Create an (I believe) "File Browser" item type. For Settings:
    - Storage Type "BLOB column specified in Item Source" (and place the column name of the BLOB there)
    - MIME Type Column: (column name) -- since you have multiple types, this is a MUST HAVE
    - Filename Column: (column name) -- I highly recommend you have this.
    - Content Disposition == INLINE <-- this is the kicker
    Also, you will need a Browser Plugin for each of the MIME Types (otherwise, the browser may try to 'download' the file)
    Browsers can handle Image types internally. Adobe's plugin can handle PDFs. I don't know about Word/Excel.
    Again, I don't remember the exact details, but that should cover most of it.
    MK

  • Problem Displaying image from blob

    Hi all,
    I m using,
    Database : 10g Rel 2
    Frontend : DevSuite 10g
    OS : WinXp
    Browser : IE 6
    Problem : In my forms i m displaying images from blob column but some of the images are not displayed. I have tried with all image formats available in combination with all available display quality but no luck. What could be the reason for it and how do i solve it?
    Can anyone help me plz?
    Thnx in advance.
    Imtiaz

    Hello,
    It is very difficult for us to "guess" what images you can read and what others you cannot.
    Maybe you could provide more information on images that are not displayed ?
    What is their native format ?
    Francois

  • Apex 4.0 display image item :BLOB column returned by SQL statement

    Hello
    I'm creating an display image item in apex 4.0. The source is a BLOB column returned by SQL statement.
    When I'm issuing an sql statement like this:
       select lado.blob_content
       from   large_documents      lado
       ,        large_doc_headers    ladh
       where lado.ladh_nr = ladh.nr
       more criteriait works fine.
    When I create a function inside a package with the same query (in a cursor)
    function get_image(some parameters in) return blob
    Following in apex by:
    select get_image(some parameters) from dualI get a
    ORA-06502: PL/SQL: numeric or value error: character string buffer too smallAnybody any idea why this does not work?
    Regards Erik

    Hi Eric,
    the environment assumes varchar2-output by default, which will be limited to 32767 characters and may have problems with binary formats. You could define a blob-variable to select the value into.
    DECLARE
      l_blob BLOB;
    BEGIN
      SELECT get_image(some parameters)
        INTO l_blob
        FROM dual;
    END;
    /If you expect the BLOB-Content to be text (you should consider CLOB then), you may use UTL_RAW.CAST_TO_VARCHAR2 to convert the content. If your object is larger than the maximum varchar2 size, or you want to convert BLOB to CLOB, you might be interested in some converter like described here: {message:id=559749}
    Hope this is what you were searching for.
    -Udo

Maybe you are looking for