How to show an image stored by using SQLLDR as BLOB in ORACLE 10g

Hi!
i used SQLLDR to upload images from localhost to my oracle db,
i saves theme as BLOB`s.
my problem is:
i can not view them correctly, showing it using the code below, i get:
gtìSNEvR=Cm¯ö¾ÆTÿmÖØÏs_û«¬ú ÿSê¯HwýÓ ›[[ü/ñŠÝßSº‡—¢
does any know what to do?? can help me??
thank you!
A.H.S.
<?php
echo "<p>Attempting database connection...</p></p>";
$db_conn = ocilogon("username", "password", "ORACLE_SID");
if (!$db_conn)
echo "...FAILED. Check the username, passwd, dbstring given in this script are valid or not.</p>";
if (OCIError($db_conn))
$erra=OCIError($db_conn);
dodberror("SQL Error: $erra $erra[message]");
        exit;
      else
        echo "<p>Connected...</p></p>";
$table_name="images";
$stmt = ociparse($db_conn, "select * from $table_name" );
     if (!$stmt)
        echo '<p>parsing error</p></p>';
      if (!ociexecute($stmt,OCI_DEFAULT))
        echo "<font color='red'><p>query execute error!</p></font>";
       echo "<table border=1 cellspacing='0' width='50%'>\n";
       $ncols = OCINumCols($stmt);
       echo "<tr>\n";
       for ($i = 1; $i <= $ncols; $i++) {
            $column_name  = OCIColumnName($stmt,$i);
            echo "<td><b>$column_name</b></td>\n";
       while (OCIFetch($stmt))
           echo "<tr>\n";
        for ($i = 1; $i <= $ncols; $i++)
          $column_name  = OCIColumnName($stmt,$i);
          $column_value = OCIResult($stmt,$i);
          if($column_name=="DATA")  
          //Header("content-type: image/jpg");
           $image = "$column_value->load()";
           echo $column_value;    // gives OBJECT!
           echo "<td><img src='$image' width='48' height='48' align='middle' border='0' alt='not found'> </td>\n";
          //echo "<td><img src='$column_value.jpg' width='48' height='48' a-lign='middle' border='0' alt='not found'> </td>\n"; //works 100%
          //$c1 = '<IMG height=128 width=600 SRC="http://host/' . $row[2] . '">';
            //if ($row[image]) { 
          //header("Content-Type: $row[image_type]"); 
          //print "$row[image]";
            else
          echo "<td><b>$column_value</b></td>\n";
        echo "</tr>\n";
      echo "</tr>\n";
       echo "</table>\n";
      OCIFreeStatement($stmt);
      OCILogoff($db_conn);
    ?>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Do you need to uncomment one of the header() functions? Make sure
it is called before any text or whitespace is sent.
Look at the example in PHP 5 Code to Upload and Retrieve an Image (aka BLOB) with Oracle
-- cj

Similar Messages

  • How to get the image stored in archieve link as an attachment in work item.

    Hi All,
    through transaction OAWD we are storing scanned images.
    Once this transaction is executed a workitem appears in the inbox of the initiator with the scanned invoice as attachment.
    When the user executes the work item FV60 screen is displayed where the user enters the data based on the scanned invoice attachment.
    After the user Parks the document the custom workflow triggers and a workitem appears in the inbox of an approver.
    Our requirement is that the scanned image should also appear as the attachment.
    Can you please suggest how to get the image stored in archieve link as an attachment in work item.
    Regards
    Shraddha

    Hi Martin,
    with every parked document a scanned image is linked.
    I need to create a link under objects and attachments in the work item, such that when the user clicks that link the image is displayed.
    At present the following functionality is available.
    The BO used is FIPP
    Objects and attachments:
    parkeddocument:AK0108500001252008.(via FIPP binding with WIOBJECT_ID)
    On clicking the link below objects and attachments: the parked document AK0108500001252008 opens in display mode.
    Now we want to have 2 links:
    parkeddocument:AK0108500001252008.
    image.
    When we click on the link image then the scanned invoice linked to the document should get opened.
    I am able to get the image id of the the image through  SAP_WAPI_GET__OBJECTS,
    export parameter leading_object provides the detail.
    But I am not able to figure out how to use it in my workflow to display it as an attachment.
    Hope this will give a better understanding of my question.
    can you please suggest as to how I should proceed with it.

  • How to add an image over another using af:image

    How to add an image over another using af:image
    Thanks,
    Veera

    i have a image which is black strip. i have added that to af:image
    <af:image source="image1" id="image" />
    on the black strip, i need to add company logo.
    how to achieve it.
    Thanks,
    Veera.

  • How to deal with images stored in oracle

    hi,
    can anyone help me to solve this issue please:
    in fact i am developping a swing based standalone application based on a TCP/IP client-server connection, so the point is to display on my frame for each student his information and also his personal picture
    first step : storing the personal picture into the oracle database from a specefic frame that allows to specify each NEW student's profile and his photo.
    step 2: as needed, a specefic frame allows to retrieve all the information related to a student and his photo to ( in a jlabel or other swing componenet)
    how to deal with this storing and then the retriving from the oracle DB
    any help please!

    If I understand well your problem, you need your client java application to store and retrive information from an oracle DB.
    This can be done via JDBC.
    Here's the tutorial:
    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html
    Look at
    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC2018
    for storing and retriving binary data (like java serialized objects (Images for example))

  • How to compress non-image object streams using maximum compression in acrobat x pro

    How to compress non-image object streams using maximum compression in acrobat x pro
    Please provide the screenshot if possible. Thanks!

    ZIP is the best compression for non-image streams, and it will almost certainly already have been used.

  • Help building an e-commerce site using DreamWeaver MX 2004 and Oracle 10G

    I'm new to using Oracle 10G. After reviewing several rdms's I've picked Oracle 10G as my rdms. I'm trying to build an ecommerce site using DreamWeaver MX 2004 and Oracle 10G. The website will be selling hardware and software products. I have a choice in DreamWeaver to go for a .asp or .jsp setup. I have several questions, here goes:
    1. Is there any book/tutorial/whitepaper out there that describes building an ecommerce site using Oracle 10G/9I/8I? Just some examples as how to make the datamodel regarding the shopping basket etc.
    2. I prefer DreamWeaver as it let's me make nice looking css style based pages without throttling too much through the code. Are there Oracle tools which allow me to make an advanced nice looking ecommerce site?
    I hope some of you can help me get started. Any effort is appreciated.
    Cheers

    I'm new to using Oracle 10G. After reviewing several rdms's I've picked Oracle 10G as my rdms. I'm trying to build an ecommerce site using DreamWeaver MX 2004 and Oracle 10G. The website will be selling hardware and software products. I have a choice in DreamWeaver to go for a .asp or .jsp setup. I have several questions, here goes:
    1. Is there any book/tutorial/whitepaper out there that describes building an ecommerce site using Oracle 10G/9I/8I? Just some examples as how to make the datamodel regarding the shopping basket etc.
    2. I prefer DreamWeaver as it let's me make nice looking css style based pages without throttling too much through the code. Are there Oracle tools which allow me to make an advanced nice looking ecommerce site?
    I hope some of you can help me get started. Any effort is appreciated.
    Cheers

  • Using scatter graph type in oracle 10g forms using bi beans

    hi.. how i can use scatter graph type in oracle 10g using bi beans..
    it seems scatter graph is supported in 10g but it doesnt work at all..
    i used to use oracle graphics builder in oracle 6i forms,now i need to convert all my old graphs to 10g forms..the line,bar and pie it work very well but the scatter didnt work..
    so please if anyone know how to use it please tell me.. and what versions of bi beans support the scatter graph type
    thanks.
    u can email me in
    [email protected]

    Hi,
    What version of Oracle Forms are you using? If it is 10.1.2.0.2 (10g R2 Phase 2) then the BI Beans version should be 10.1.2.1 (3.2.2.0.24.2).
    When you run a Graph, do you see any version numbers?
    Regardless of the version, scatter graph should work. What kind of errors are you getting?
    When you install BI Beans in JDeveloper, you get access to BI Beans Help. Go to the following topic for setting up data for a scatter graph:
    Help -> Building Applications with BI Beans -> Presenting Data in Graphs -> Specifying Data for Graphs
    Did you try posting your question on the Oracle Forms forum?
    BI Beans PM

  • What is the use of SYSAUX Tablespace in Oracle 10G

    Dear Experts,
    Please Tell me What is the use of SYSAUX Tablespace in Oracle 10G Because
    during Web Load Testing It is going to increase countinuosly.Although i am not using this with any tables.
    How Can I find out the what is gong on in this.
    Can I Remove this tablesspace and other non using Schemas like FLOWS_020100,MDSYS,OUTLN,DIP and TSMSYS etc.

    What is SYSAUX?
    The SYSAUX tablespace provides storage of non-sys-related tables and indexes that traditionally were placed in the SYSTEM tablespace. For example, the tables and indexes that were previously owned by the system user can now be specified for a SYSAUX tablespace. Unfortunately, Oracle still places the SCOTT schema and the other demonstration schemas in the SYSTEM tablespace. Go figure.
    The SYSAUX tablespace is specified with the CREATE DATABASE command. This is demonstrated in the example database creation script in Figure 1.1.
    CREATE DATABASE test
    MAXINSTANCES 1
    MAXLOGHISTORY 1
    MAXLOGFILES 5
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/system01.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL
    SYSAUX DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/sysaux01.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
    UNDO TABLESPACE "UNDOTBS1" DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
    CHARACTER SET WE8ISO8859P1
    NATIONAL CHARACTER SET AL16UTF16
    LOGFILE GROUP 1 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo01.log') SIZE 10240K,
    GROUP 2 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo02.log') SIZE 10240K,
    GROUP 3 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo03.log') SIZE 10240K
    USER SYS IDENTIFIED BY "password" USER SYSTEM IDENTIFIED BY "password";
    Oracle10g sysaux
    With the new SYSAUX tablespace, Oracle comes closer to providing all the needed tablespaces for a truly OFA-compliant database right out of the box. With just one CREATE DATABASE command we can specify the SYSTEM tablespace, the TEMPORARY tablespace, the AUXSYS tablespace, the default UNDO tablespace, and the redo logs.
    Of course, with the Oracle Managed Files option you can create an entire database with a single command, but the database created is not suitable for production use and is not OFA-compliant.
    The SYSAUX tablespace is required in all new 10g databases. Only the SYSAUX tablespace datafile location is specified. Oracle specifies the remainder of the tablespace properties including:
    online
    permanent
    read write
    extent managment local
    segment space management auto
    If a datafile is specified for the SYSTEM tablespace, then one must be specified for the SYSAUX tablespace as well. If one is not specified, then the CREATE DATABASE command will fail. The only exception is for an Oracle Managed File system.
    During any update of a database to Oracle Database 10g, a SYSAUX tablespace must be created or the upgrade will fail. The SYSAUX tablespace has the same security profile as the SYSTEM tablespace. However, loss of the SYSAUX tablespace will not result in a database crash, only the functional loss of the schemas it contains.
    Can I drop SysAux?
    DROP DATAFILE
    Read this...

  • How to convert varchar to BLOB in oracle 10g?

    Hi all,
    I have 2 columns A and B which are of varchar2(2000) dataype.
    I would like to concatinate these 2 columns and convert them into BLOB in oracle 10g.
    Any help is appreciated.
    Regards,
    Ravi

    don't use BLOB to store large text, use CLOB instead
    anyway:
    SQL> create table test
      2  (txt varchar2(10)
      3  ,other varchar2(10)
      4  );
    Table created.
    SQL>
    SQL> insert into test values ('some text', 'other text');
    1 row created.
    SQL>
    SQL> create table test2
      2  (col blob)
      3  /
    Table created.
    SQL>
    SQL> insert into test2
      2  select utl_raw.cast_to_raw (txt||other)
      3    from test
      4  /
    1 row created.
    SQL> select *
      2    from test2
      3  /
    SP2-0678: Column or attribute type can not be displayed by SQL*Plus
    SQL>
    SQL> select utl_raw.cast_to_varchar2(col)
      2    from test2
      3  /
    UTL_RAW.CAST_TO_VARCHAR2(COL)
    some textother text
    SQL>
    SQL> drop table test
      2  /
    Table dropped.
    SQL> drop table test2
      2  /
    Table dropped.

  • How to show an image in JSP given the bytes[] of the photo?

    Hi all,
    I stored a user's picture in the db as text. For this I simply converted the JPG to bytes[] and from bytes to string: Base64.encode(bytes)
    Now I wish to do the reverse - to 'output' the image on the screen. So given the bytes[] of the image with
              byte[] bytesDB = Base64.decode(userPhotoStr); //userPhotoStr is something like this: /9j/4AAQSkZJRgA...Question: How can I show the image in the JSP page embedded in the page not as download?
    I'm using struts with JSP pages.
    Thank you!!!!

    Images in HTML are to be displayed using <img> element. All what an <img> element can take as image is an URL pointing to the image in question.
    If the image is dynamic, then you can just let that URL point to some Servlet which takes some request parameter or reads the path info, reads/gets the image as byte array or (much more efficient) as inputstream and writes it to the outputstream of the response.
    You may get some ideas out of this: [http://balusc.blogspot.com/2007/04/imageservlet.html].
    By the way, massaging the byte array from/to a String is a terribly bad idea. Just store bytes as computer readable bytes, not as human readable characters, this makes completely no sense. Characters on its turn have to be converted to bytes again after all, but now you've let the DB do the work. All with all a performance pain. Bytes > Chars > Bytes > Chars > Bytes instead of just Byes > Bytes. In database you normally use BLOB, BINARY or equivalent for this in combination with JDBC's PreparedStatement#setBinaryStream() and ResultSet#getBinaryStream().

  • How to show thumbnail images in finder?

    Windows can do this, so I'm sure Mac must be able to ....
    When I am viewing a list of jpegs in the finder, how can I see thumbnail versions of the images? Currently, all that's displayed is the jpeg icon.
    Thanks.

    If you have files that don't show a thumbnail icon, it may be that whatever program created the files didn't create a thumbnail image.
    You can add the preview image quite easily using a program like
    QuickImage (http://www.versiontracker.com/dyn/moreinfo/macosx/19253)

  • How to show an image(jpg/gif) on a JTabbedPanel

    Hi
    I tried to show an image on a JPanel of a JTabbedPanel.
    I the only way to show it for some time was this:
    in the StateChangedListener I use drawImage when the selected panel is teh one I want to draw the image at.
    Tracing code makes the panel show, burt when I step
    all the way up, the panel will be repainted without my image.
    I use mediatracker to get the image loaded.
    Any Idea
    Hanns

    JTabbedPane has components as its tabs. Using a JPanel is not mandatory. Try using a JLabel instead with an Icon (use ImageIcon) in it.
    JTabbedPane tabbed = new JTabbedPane();
    tabbed.addTab(
        "my image panel",
        new JLabel( new ImageIcon( "images/MyIcon.gif" ) )
    );if your were referring to the image of the little tabs, use this:
    JTabbedPane tabbed = new JTabbedPane();
    tabbed.addTab(
        "my tab",
        new ImageIcon( "images/MyImage.gif" ),
        myPanel // instance of Component, can be a JPanel or any JComponent you want.
    );

  • How to call a stored procedure using its package name in Oracle

    hi
    we're doing a JDBC scenario where we call a stored procedure(a.prc) using its package name(b)The stored procedure has In /Out/IN-OUT parameter.
    i have got 2 queries:
    1- How to call the stored procedure using it's package.
    2- How to capture the In/Out parameter in the response.

    hi Prateek
    thanks for the reply.
    However when i tried mapping it to Package.procedure, communication channel throws the error saying that Package.proceudre needs to be declared.
    As i said , the procedure has IN-OUT parameter too.In oracle we need to write a block if we want to read the IN-OUT parameter.
    How to get the IN-OUT parameter in XI?

  • How to call PL/SQL stored procedure using ODBC?

    Could anyone tell me how can I call PL/SQL stored procedure using
    ODBC? Are there any sample codes?
    Thanx!
    null

    You are correct on all counts, they all should work.
    Oracle Product Development Team wrote:
    : Hi,
    : I don't know the exact syntax in ODBC, but reasoning by analogy
    : with other API's, I'd bet one of the following works
    : (for a call to: procedure my_proc(n1 number, n2 number);):
    : "{ my_proc(1,2); }"
    : "{ call my_proc(1,2); }"
    : "{ begin my_proc(1,2); end }"
    : "begin my_proc(1,2); end;"
    : "begin my_proc(1,2); end"
    : Hope this helps. - Pierre
    : jiangbuf (guest) wrote:
    : : Could anyone tell me how can I call PL/SQL stored procedure
    : using
    : : ODBC? Are there any sample codes?
    : : Thanx!
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • How to show muliti language data correctly using webi reports

    Hi ,
    Can you please suggest me how to show multi language data correctly in webi reports .
    Do we need to install any lang pack in both server and client machine ?
    Thanks & Regards
    Venkat

    you mean using translation manager? or data from DB? or both.
    You need to make sure that your DB is already configured for multiple languages.
    Enable the OS for multi languages
    On XIR3.1, you will need to install language packs on the processing servers.  then you can utilize translation manager.
    Installation of Language Packs are a pain to install and update.

Maybe you are looking for

  • Using the latest version of Numbers on iPad.

    I am using the latest version of Apple Numbers on both my iPad and Mac. However, when using my iPad, I am unable to enter any Text into cells. Date format, numbers and functions all work OK, but there is no response when I type in text. Is this a kno

  • A problem about Variant

    hello, what does VARIANT mean?How can I use it in VC++? Who can give me some details about VARIANT? thanks. 帖子被nicolasdai在09-26-2006 04:10 AM时编辑过了

  • Pure SQL and Border Use Cases?

    Hi Gurus I was developing a DB Adapter to select data from Shipping tables. I did it by polling as well as with Custom SQL. While using the custom SQL I got the following error in my domain.log (my query that I wrote) failes, Caused by java.sql.SQLEx

  • Duplicate line added with a different billing plan

    Hi, when i save a order number then only 1 entry for billing plan is there in the FPLTC table. but when i save the INVOICE there a duplicate entry is added with different bIlling plan in the FPLTC table. can somebody tell me why this is happening. Is

  • Upload address data and ship to party

    Hello Freindz I want to upload address data and ship to party for the customer.  How could I do these two task together. I have found BAPI to upload address data BAPI_BUPA_ADDRESS_ADD but I wish to upload both address data and ship to party data toge