GetBlob Error During fetching of Images from Oracle 10g

Dear Sir,
By using getBlob Function ,i am getting following error:"Unsupportable action has performed".
I am using oracle 10g.I am using java code to retrieve image from Oracle 10g.
So plz help me by giving full code with explaination.
Thankyou.
Yours Obedient
Dipesh Kumar

I seriously doubt Oracle would write error messages with such atrocious English.
So it's almost certainly an error from either your own code or code you're calling in some library or part of the application you're not mentioning that noone here except you has knowledge of.
Ergo, we're not going to be able to help you unless you provide a lot more information.
And no, we're not going to write your code for you.

Similar Messages

  • Error While Querying DB Link from Oracle 10g to Postgres 8.2

    Hi,
    I have installed unixodbc 2.3.1, postgres odbc driver (psqlodbc-07.03) and dg4odbc 11.2
    On querying : select sysdate from dual@dblink_postgresql, the following error occurs:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a' : file not found {01000}
    ORA-02063: preceding 2 lines from DBLINK_POSTGRES
    Similar error appears in the trace file as well.
    [unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a'
    $ isql -v postgresql postgres postgres@2012
    [01000][unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a' : file not found
    [ISQL]ERROR: Could not SQLConnect
    However the file is present in the location and has no permission related problems.
    $ pwd
    /oracle/psqlodbc/lib
    $ ls -lrt
    total 2952
    -rwxr-xr-x 1 oracle oinstall 663 Mar 25 15:28 psqlodbc.la
    -rw-r--r-- 1 oracle oinstall 731419 Mar 25 15:28 libpsqlodbc.a
    -rw-r--r-- 1 oracle oinstall 12215 Mar 25 22:11 win_md5.o
    -rw-r--r-- 1 oracle oinstall 18100 Mar 25 22:11 options.o
    -rw-r--r-- 1 oracle oinstall 13196 Mar 25 22:11 misc.o
    -rw-r--r-- 1 oracle oinstall 4234 Mar 25 22:11 lobj.o
    -rw-r--r-- 1 oracle oinstall 122442 Mar 25 22:11 info.o
    -rw-r--r-- 1 oracle oinstall 26464 Mar 25 22:11 execute.o
    -rw-r--r-- 1 oracle oinstall 22070 Mar 25 22:11 environ.o
    -rw-r--r-- 1 oracle oinstall 8633 Mar 25 22:11 drvconn.o
    -rw-r--r-- 1 oracle oinstall 83758 Mar 25 22:11 convert.o
    -rw-r--r-- 1 oracle oinstall 62529 Mar 25 22:11 connection.o
    -rw-r--r-- 1 oracle oinstall 5685 Mar 25 22:11 columninfo.o
    -rw-r--r-- 1 oracle oinstall 19724 Mar 25 22:11 bind.o
    -rw-r--r-- 1 oracle oinstall 3768 Mar 25 22:11 tuplelist.o
    -rw-r--r-- 1 oracle oinstall 2816 Mar 25 22:11 tuple.o
    -rw-r--r-- 1 oracle oinstall 36770 Mar 25 22:11 statement.o
    -rw-r--r-- 1 oracle oinstall 10490 Mar 25 22:11 socket.o
    -rw-r--r-- 1 oracle oinstall 74140 Mar 25 22:11 results.o
    -rw-r--r-- 1 oracle oinstall 22686 Mar 25 22:11 qresult.o
    -rw-r--r-- 1 oracle oinstall 1977 Mar 25 22:11 psqlodbc.o
    -rw-r--r-- 1 oracle oinstall 25893 Mar 25 22:11 pgtypes.o
    -rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 pgapi30.o
    -rw-r--r-- 1 oracle oinstall 34071 Mar 25 22:11 parse.o
    -rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 odbcapi30.o
    -rw-r--r-- 1 oracle oinstall 41540 Mar 25 22:11 odbcapi.o
    -rw-r--r-- 1 oracle oinstall 11601 Mar 25 22:11 multibyte.o
    -rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 info30.o
    -rw-r--r-- 1 oracle oinstall 5972 Mar 25 22:11 gpps.o
    -rw-r--r-- 1 oracle oinstall 37546 Mar 25 22:11 dlg_specific.o
    My odbc.ini and init4dg4odbc looks like below:
    $ pg odbc.ini
    [postgresql]
    Description = Test to Postgres
    Driver = /oracle/psqlodbc/lib/libpsqlodbc.a
    Trace = Yes
    TraceFile = postgres.log
    Database = postgres
    Servername = TCLDSAPORTUAT
    UserName = postgres
    Password = postgres@2012
    Port = 5432
    Protocol = TCP
    ReadOnly = Yes
    RowVersioning = No
    ShowSystemTables = No
    ShowOidColumn = No
    FakeOidIndex = No
    $ pg initdg4odbc.ora
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = postgresql
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_SHAREABLE_NAME = /oracle/unixodbc64/lib/libodbc.so
    # ODBC specific environment variables
    set ODBCINI=/oracle/unixodbc64/etc/odbc.ini
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    I found similar threads in the forum but could not find solution for this problem.
    Please help to resolve this issue.
    Thanks,
    Akanksha
    Edited by: 996208 on Mar 26, 2013 5:35 AM

    Hi Mike,
    I used the truss option for diagnosis, the output is really long and shows the same error at the end of execution:
    $truss isql -v postgresql postgres postgres@2012
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    access("/usr/lib/nls/msg/en_US/execerr.cat", 0) = 0
    _getpid()                                       = 27262980
    kopen("/usr/lib/nls/msg/en_US/execerr.cat", O_RDONLY) = 3
    kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
    kfcntl(3, F_SETFD, 0x0000000000000001) = 0
    kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
    kread(3, "\0\001 ù\001\001 I S O 8".., 4096) = 4096
    lseek(3, 0, 1) = 4096
    lseek(3, 0, 1) = 4096
    lseek(3, 0, 1) = 4096
    _getpid()                                       = 27262980
    lseek(3, 0, 1) = 4096
    _getpid()                                       = 27262980
    lseek(3, 0, 1) = 4096
    _getpid()                                       = 27262980
    lseek(3, 0, 1) = 4096
    lseek(3, 4639, 0) = 4639
    kread(3, "\t 0 5 0 9 - 1 9 4 E x".., 4096) = 1686
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    kioctl(1, 22528, 0x0000000000000000, 0x0000000000000000) = 0
    [01000][unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/psqlodbc.o' : file not found
    kwrite(1, " [ 0 1 0 0 0 ] [ u n i x".., 99)     = 99
    [ISQL]ERROR: Could not SQLConnect
    kwrite(2, " [ I S Q L ] E R R O R :".., 34) = 34
    kfcntl(1, F_GETFL, 0x0000000010DF0051) = 67110914
    kfcntl(2, F_GETFL, 0x0000000010DF0051) = 67110914
    _exit(1)
    Do I need to install postgres software also?
    While installing postgres odbc driver in /oracle/psqlodbc only two folders were created viz. lib and share
    In lib folder two files were created viz. psqlodbc.la and libpsqlodbc.a
    And everybody on the net seems to refer psqlodbc.so in the "Driver = " parameter
    Today, I extracted the libpsqlodbc.a by using ar -X 64 -xv libpsqlodbc.a again, still no file with .so has been created.
    $ ls -lrt
    total 2952
    -rwxr-xr-x 1 oracle oinstall 663 Mar 25 15:28 psqlodbc.la
    -rwxr-xr-x 1 oracle oinstall 731419 Mar 28 13:51 libpsqlodbc.a
    -rw-r--r-- 1 oracle oinstall 12215 Apr 01 13:50 win_md5.o
    -rw-r--r-- 1 oracle oinstall 3768 Apr 01 13:50 tuplelist.o
    -rw-r--r-- 1 oracle oinstall 2816 Apr 01 13:50 tuple.o
    -rw-r--r-- 1 oracle oinstall 36770 Apr 01 13:50 statement.o
    -rw-r--r-- 1 oracle oinstall 10490 Apr 01 13:50 socket.o
    -rw-r--r-- 1 oracle oinstall 74140 Apr 01 13:50 results.o
    -rw-r--r-- 1 oracle oinstall 22686 Apr 01 13:50 qresult.o
    -rw-r--r-- 1 oracle oinstall 1977 Apr 01 13:50 psqlodbc.o
    -rw-r--r-- 1 oracle oinstall 25893 Apr 01 13:50 pgtypes.o
    -rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 pgapi30.o
    -rw-r--r-- 1 oracle oinstall 34071 Apr 01 13:50 parse.o
    -rw-r--r-- 1 oracle oinstall 18100 Apr 01 13:50 options.o
    -rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 odbcapi30.o
    -rw-r--r-- 1 oracle oinstall 41540 Apr 01 13:50 odbcapi.o
    -rw-r--r-- 1 oracle oinstall 11601 Apr 01 13:50 multibyte.o
    -rw-r--r-- 1 oracle oinstall 13196 Apr 01 13:50 misc.o
    -rw-r--r-- 1 oracle oinstall 4234 Apr 01 13:50 lobj.o
    -rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 info30.o
    -rw-r--r-- 1 oracle oinstall 122442 Apr 01 13:50 info.o
    -rw-r--r-- 1 oracle oinstall 5972 Apr 01 13:50 gpps.o
    -rw-r--r-- 1 oracle oinstall 26464 Apr 01 13:50 execute.o
    -rw-r--r-- 1 oracle oinstall 22070 Apr 01 13:50 environ.o
    -rw-r--r-- 1 oracle oinstall 8633 Apr 01 13:50 drvconn.o
    -rw-r--r-- 1 oracle oinstall 37546 Apr 01 13:50 dlg_specific.o
    -rw-r--r-- 1 oracle oinstall 83758 Apr 01 13:50 convert.o
    -rw-r--r-- 1 oracle oinstall 62529 Apr 01 13:50 connection.o
    -rw-r--r-- 1 oracle oinstall 5685 Apr 01 13:50 columninfo.o
    -rw-r--r-- 1 oracle oinstall 19724 Apr 01 13:50 bind.o
    Thanks,
    Akanksha

  • Error While loading a image from database

    Purpose
    Error While loading the Image from the database
    ORA-06502: PL/SQL : numeric or value error:Character string buffer too small
    ORA-06512: at "Sys.HTP" ,line 1480
    Requirement:
    I am developing the web pages using PSP(Pl/sql Serverpages) . I have a requirement to show a image in the webpage. I got the following procedures from the oracle website.
    I have created the following table to store the images
    create table DEMO
    ID INTEGER not null,
    THEBLOB BLOB
    And I also uploaded the Images. Now I am try to get a image from the table using the following procedure .But I am getting the error message line 25( htp.prn( utl_raw.cast_to_varchar2( l_raw ) );) .at it throws the following error messages
    ORA-06502: PL/SQL : numeric or value error:Character string buffer too small
    ORA-06512: at "Sys.HTP" ,line 1480
    Procedure that I used to get the image
    create or replace package body image_get
    as
    procedure gif( p_id in demo.id%type )
    is
    l_lob blob;
    l_amt number default 30;
    l_off number default 1;
    l_raw raw(4096);
    begin
    select theBlob into l_lob
    from demo
    where id = p_id;
    -- make sure to change this for your type!
    owa_util.mime_header( 'image/gif' );
    begin
    loop
    dbms_lob.read( l_lob, l_amt, l_off, l_raw );
    -- it is vital to use htp.PRN to avoid
    -- spurious line feeds getting added to your
    -- document
    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;
    end;
    What I have to do to correct this problem. This demo procedure and table that I am downloaded from oracle. Some where I made a mistake. any help??
    Thanks,
    Nats

    Hi Satish,
    I have set the raw value as 3600 but still its gives the same error only. When I debug the procedure its throwing the error stack in
    SYS.htp.prn procedure of the following line of code
    if (rows_in < pack_after) then
    while ((len - loc) >= HTBUF_LEN)
    loop
    rows_in := rows_in + 1;
    htbuf(rows_in) := substr(cbuf, loc + 1, HTBUF_LEN);
    loc := loc + HTBUF_LEN;
    end loop;
    if (loc < len)
    then
    rows_in := rows_in + 1;
    htbuf(rows_in) := substr(cbuf, loc + 1);
    end if;
    return;
    end if;
    Its a system procedure. I don't no how to proceed .. I am really stucked on this....is their any other method to take picture from the database and displayed in the web page.....???? any idea..../suggesstion??
    Thanks for your help!!!.

  • I tried to display gif image from oracle to jsp but nothing appear

    i tried to display image from oracle DB to jsp directly without using file processing , and i used Servlet and jsp , Servlet to get image from DB and jsp to use <img> tag , when i Run Servlet code
    the image appaer on Microsoft Photo Editor , and when i run jsp the image dose not appear on jsp page , so please anyone has an idea about this broblem ,send the soluation or any information to my e-mail [email protected] , and I'll thankful about your help.
    the Servlet and jsp code are below .
    thank for your help
    Servlet:
    import java.io.InputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    public class Servlet extends HttpServlet
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    response.setContentType("image/gif");
    int id = Integer.parseInt(request.getParameter("no"));
    // int id = 2 ; when Run Servlet .
    ResultSet rs = null;
    Connection Lcon = null;
    String stmt = " select Image from ImageTable where lmage_id ="+id;
    Statement sm = null;
    String data1 ="";
    try
    Lcon = getConntcion();
    sm = Lcon.createStatement();
    rs = sm.executeQuery(stmt);
    if(rs.next())
    InputStream in = rs.getBinaryStream(1);
    ServletOutputStream sout = response.getOutputStream();
    int c;
    while((c=in.read())!= -1)
    sout.write(c);
    in.close();
    sout.flush();
    sout.close()
    }catch(Exception e)
    System.out.println("error in selectValue the error is "+e);
    finally
    rs .close( );
    sm .close( );
    Lcon.close( );
    public Connection getConntcion()
    Connection con = null;
    try{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection(",,,,,,,, DB Info ,username and password ,,,,,,,,,,,");
    }catch(Exception e)
    System.out.println("error in connection the error is "+e);
    return con;
    Jsp code :
    <%@ page contentType="text/html"%>
    <html>
    <head
    </head>
    <title> testing image </title>
    <body>
    <form>
    <img src="servlet/Servlet?no=2">
    </form>
    </body>
    </html>

    InputStream in = rs.getBinaryStream(1);
    byte[] image= null;
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    byte[] buffer = new byte[8192];
    int bytesRead = 0;
    while ((bytesRead = in.read(buffer, 0, 8192)) != -1)
         baos.write(buffer, 0, bytesRead);
    image= baos.toByteArray();
    in.close();
    ServletOutputStream sout = response.getOutputStream();
    if (image != null)
           sout.write(image);
           sout.flush();
    }

  • ERROR while connecting to Netezza Database from oracle 10g via dblink.

    Gurus,
    We are trying to connect to Netezza DB from oracle 10g DB.. We successfully establised ODBC connection but unable to retrieve data over the dblink connected from oracle to Netezza. We get this error.. Please HELP ASAP!!!!!!!!
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    Server and/or port attributes are empty {HY000,NativeErr = 33}

    Manik wrote:
    We are trying to connect to Netezza DB from oracle 10g DB.. We successfully establised ODBC connection but unable to retrieve data over the dblink connected from oracle to Netezza. We get this error.. Please HELP ASAP!!!!!!!!
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    Server and/or port attributes are empty {HY000,NativeErr = 33}Always test ODBC client connectivity on the Oracle server to the remote and foreign database, first. Use the isql ODBC client command line interface (as the oracle or grid o/s user).
    If this does not work, then Oracle HSO will also not work.
    Once you have confirmed that this is working, then configure the HSO service for Oracle.
    If that fails, enables ODBC client tracing for that HSO service (in the init file for that service) to see exactly what ODBC calls Oracle is making and which of these are failing.

  • Error, while pushing the data from Oracle to MSSQL.

    Hi,
    I am facing the below error, while pushing the data from Oracle to MSSQL.
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]Update or insert of view or function 'View_Name' failed because it contains a derived or constant field.[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL State: 00000; SQL Code: 8180)
    Please suggest me, how to overcome from this.
    Thanks.

    [email protected] wrote:
    Hi,
    I am facing the below error, while pushing the data from Oracle to MSSQL.
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]Update or insert of view or function 'View_Name' failed because it contains a derived or constant field.[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL State: 00000; SQL Code: 8180)
    Please suggest me, how to overcome from this.
    Thanks.This is an error from SQL Server being passed back to Oracle so you can see the problem.
    What it is saying is that you are trying to insert (or update) data to a database view and that view contains a column that is either a constant (literal) value or is derived (a calculation, formula or string concatenation etc.).
    As such, you can't insert or update data on that column because it has nowhere to go on the database table(s) that underly the view.

  • Want to scan an image from oracle forms -- Is it possible??

    Hi all,
    I want to scan an image from oracle forms through a scanner. I have not found any help on this topic. Pls help with example or code or with demmo form.
    BR
    Tarik.
    Edited by: Tarik_kuet on Sep 9, 2008 1:39 PM
    Edited by: Tarik_kuet on Sep 9, 2008 1:39 PM

    A colleague of me did it like this:
    * the scanner is connected to a network document server.
    * the document server sends(ftp) the image to the oracle XDB
    * a form shows the scanned documents(using a view on the ftp directory in XDB using path_view)
    * in this form the user can move the scanned document(s) to a (blob field) in a table.
    Hope this helps a bit...
    Edited by: poelger on Sep 9, 2008 10:08 AM

  • Image from Oracle BLOB is not showing

    Hi all!
    Im trying to use this code:
    <?php
    //... etc
    $sql = oci_parse($c, 'select * from pf2.documents ');
    oci_execute($sql);
    echo "<table width = 200 border = 1 cellspacing=0 cellpadding=0>";
    while ($row = oci_fetch_assoc($sql)) {
    echo "<tr>";
    echo"<td style=background-color:#DDDEEE; align=center>";
    echo $row['SHORTNAME'] ;
    echo"</td>";
    echo"<td style=background-color:#DDDEEE; align=center>";
    print $row['FILENAME'] ->load();
    echo"</td>";
    echo "</tr>";
    echo "</table>";
    //... etc
    ?>
    Here im trying to select and publish an image from Oracle BLOB,
    but in Mozilla Firefox im getting just whong text:
    яШяа�JFIF��`�`��яЫ�C� $.' ",#(7),01444'9=82<.342яЫ�C 2!!22222222222222222222222222222222222222222222222222яА�МЂ"�яД����������� яД�µ���}�!1AQa"q2Ѓ‘Ў#B±БRСр$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzѓ„…†‡€‰Љ’“”•–—�™љўЈ¤Ґ¦§Ё©ЄІіґµ¶·ё№єВГДЕЖЗИЙКТУФХЦЧШЩЪбвгдежзийкстуфхцчшщъяД�������� яД�µ��w�!1AQaq"2ЃB‘Ў±Б #3RрbrС $4б%с
    Please help!
    P.S.: Im using PHP 5.2.10 under Wintel platform,
    Oracle 9.2.0.4,
    create table DOCUMENTS
    DOCID NUMBER(10) not null,
    SHORTNAME VARCHAR2(30) not null,
    FULLNAME VARCHAR2(250) not null,
    FILENAME BLOB not null,
    AUTHOR VARCHAR2(30) not null,
    CREATIONDT DATE not null,
    VERSION VARCHAR2(10) not null
    Edited by: user502299 on 28.09.2009 5:33

    I am having a similiar problem. I have created the image.php file:
    <?
    $query = "select a.image_file FROM officer_image a, officer_info b where a.officer_id=b.officer_id and b.officer_lname like 'LEDEZ%' ";
    $stmt = @OCIParse ($db_conn, $query);
    @OCIExecute($stmt, OCI_DEFAULT);
    @OCIFetchInto($stmt, $arr, OCI_ASSOC+OCI_RETURN_LOBS);
    $result = $arr['BLOB'];
    @OCIFreeStatement($stmt);
    @OCILogoff($conn);
    $im = @imagecreatefromstring ($result);
    if (!$im) {
    $im = imagecreate(150, 30);
    $bgc = imagecolorallocate($im, 255, 255, 255);
    $tc = imagecolorallocate($im, 0, 0, 0);
    imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
    imagestring($im, 1, 5, 5, "", $tc);
    Header("Content-type: image/jpeg");
    Header("Content-Disposition: attachment; filename=filename_".uniqid(time()).".jpg");
    imagejpeg($im,'',100);
    imagedestroy($im);
    ?>
    And then in the actual search web page:
    <?php
              $tname = $_POST['lname'];
              $lname = "{$tname}%";
              $id = "1";
              //$query = "SELECT officer_id, image_file FROM officer_image WHERE ID='.$id.'";
              $query = "select a.image_file FROM officer_image a, officer_info b where a.officer_id=b.officer_id and b.officer_lname like 'LEDEZ%' ";
              //oci_bind_by_name($sql, ":bv", $lname);
              //oci_execute($sql);
              $stid = OCIParse($conn,$query);
              Header("content-type:image/jpeg");
              OCIExecute($stid, OCI_DEFAULT);
              while($succ= OCIFetchInto($stid,$row)) {
                   foreach($row as $item) {
         $blob_message = $item->load();
                   // Output the image
              //imagejpeg($blob_message);
              echo $blob_message . " " ;
              //echo "<img src="image.php?id='.$blob_message.'" border="0">. $rows['officer_id']."\">\n";
              echo "<br /><br />";
                   // Free up memory
              //imagedestroy($im);
              //while ($row = oci_fetch_assoc($sql))
    ?>
    Can anyone help?

  • I want to scan an image from oracle developer 10g ?

    Hi everybody.
    How can I scan an image from oracle developer 10g ?
    thnaks in advance..

    we did this in a similar way RajeshAlex describes.
    We used software "imaging professional" which was able to be controlled via a command-file and told by that command-file to store the scan-result into a local file.
    What we did was:
    Copy command-file to client via WEBUTIL_FILE.AS_TO_CLIENT..
    Execute command-file via WEBUTIL.CLIENT_HOST
    Show Forms-Alert on which the user has to click after scanning was finished
    Check local file which was defined in command-file and, if present, load it into the database using WEBUTIL_FILE.CLIENT_TO_DB..
    Hope this helps

  • Retrieve data from a large table from ORACLE 10g

    I am working with a Microsoft Visual Studio Project that requires to retrieve data from a large table from Oracle 10g database and export the data into the hard drive.
    The problem here is that I am not able to connect to the database directly because of license issue but I can use a third party API to retrieve data from the database. This API has sufficient previllege/license permission on to the database to perform retrieval of data. So, I am not able to use DTS/SSIS or other tool to import data from the database directly connecting to it.
    Here my approach is...first retrieve the data using the API into a .net DataTable and then dump the records from it into the hard drive in a specific format (might be in Excel file/ another SQL server database).
    When I try to retrieve the data from a large table having over 13 lacs records (3-4 GB) in a data table using the visual studio project, I get an Out of memory exception.
    But is there any better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?
    Any help on this problem will be highly appriciated.
    Thanks in advance...
    -Jahedur Rahman
    Edited by: Jahedur on May 16, 2010 11:42 PM

    Girish...Thanks for your reply...But I am sorry for the confusions. Let me explain that...
    1."export the data into another media into the hard drive."
    What does it mean by this line i.e. another media into hard drive???
    ANS: Sorry...I just want to write the data in a file or in a table in SQL server database.
    2."I am not able to connect to the database directly because of license issue"
    huh?? I never heard this question that a user is not able to connect the db because of license. What error / message you are getting?
    ANS: My company uses a 3rd party application that uses ORACLE 10g. And my compnay is licensed to use the 3rd party application (APP+Database is a package) and did not purchased ORACLE license to use directly. So I will not connect to the database directly.
    3.I am not sure which API is you are talking about, but i am running an application of the visual studio data grid or similar kind of controls; in which i can select (select query) as many rows as i needed; no issue.
    ANS: This API is provided by the 3rd party application vendor. I can pass a query to it and it returns a datatable.
    4."better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?"
    ANS: As I get a system error (out of memory) when I select all rows in a datatable at a time, I wanted to retrieve the data in multiple phases.
    E.g: 1 to 20,000 records in 1st phase
    20,001 to 40,000 records in 2nd phase
    40,001 to ...... records in 3nd phase
    and so on...
    Please let me know if this does not clarify your confusions... :)
    Thanks...
    -Jahedur Rahman
    Edited by: user13114507 on May 12, 2010 11:28 PM

  • Error while using UTP_MAIL package in oracle 10g

    Hi,
    I am using the UTP_MAIL package to send a mail from oracle 10g.
    I hane connected to the database as sysdba,but while setting the SMTP_SERVER_OUTPUT parameter i get the following error.
    SQL> ALTER SYSTEM SET smtp_out_server='blrkecmbx02.ad.abc.com:25' scope=both;
    ERROR at line 1:
    ORA-02095: specified initialization parameter cannot be modified
    Pls help to figure out a solution.

    This parameter is not modifiable, check the Oracle Reference: SMTP_OUT_SERVER Initialization Parameter
    Try the scope=spfile instead of both.
    ~ Madrid

  • Porting from Oracle 10g AS to Oracle 11g Weblogic server

    Hi,
    I am trying to port J2EE applicatin from Oracle 10g AS to Oracle 11g Weblogic Server. I have jsp files which contains sql code embedded to fetch data from the DB. The components used in this application are Java, JSP, Servlets and Stateless session beans.
    I have a commonjar which is used to create DB Connection manager and other common stuff which is present inside web-inf/lib. My application is packaged as an ear and which contains the war and different ejb-project.jar files. When the Stateless bean is trying to call the ConnectionManager class, which is present inside the commonjar inside web-inf/lib, I get InvocationTargetException. When I debugged in Eclipse, I see that that inside ejb the reference ConnectionManager, the variable cannot be resolved. So I guess at runtime, ejb is not able to locate ConnectionManager Class.
    I tried to copy this jar to APP-INF/lib and the same jar is present inside web-inf/lib as well. In that case what happens is the jsp fails with the exception ConnectionManager cannot be resolved.
    How can I make the ejb work by keeping the commonjar inside web-inf/lib alone.
    Any help or suggestions?
    Thanks
    Raj

    The classloader hierarchy in WLS looks like this (arrows denote inheritance direction):
    Java bootstrap classloader <- Java CLASSPATH classloader <- WLS $DOMAIN_HOME/lib classloader <- Application (e.g., EAR) classloader <- web app classloader <- single JSP classloader
    The Connection Manager is loaded by the web app classloader while the EJBs are loaded by the application classloader so the EJBs have no visibility to the classes loaded by the child (web app) classloader.
    The simplest fix might be to move the Connection Manager jar file to the EAR file's APP-INF/lib directory.
    One word of caution though, you need to be using WebLogic Server's Data Sources and JDBC connection pooling to make sure that you correct transactional behavior if the application is doing any sort of JTA transaction (regardless of whether the JTA transactions are using XA or not...).
    Hope this helps,
    Robert

  • How to run a report from oracle 10g form in .csv format

    dear all,
    how to run a report from oracle 10g form in .csv format? i've already run in pdf & excel format.
    i'm using
    SET_REPORT_OBJECT_PROPERTY (ro_report_id, report_desformat, 'PDF'); --for pdf
    SET_REPORT_OBJECT_PROPERTY (ro_report_id, report_desformat, 'SPREADSHEET'); ---for excel
    Please Help..

    i have already tried.
    but the report show in htm or html format. that file will not save into csv. please help.

  • How to delete client from oracle 10g ASM

    Hi,
    I would like to know how to delete client from oracle 10g ASM, while configuring Dataguard in same windows os i have by mistake created the standby in ASM.
    However later i have corrected the datafile destination. My Primary database is in ASM and the standby in disk.
    Could anyone please tell me how do i delete the client from ASM. On view from asmcmd it shows db_unknown and from v$asm_client
    GROUP_NUMBER INSTANCE_NAME
    DB_NAME STATUS
    SOFTWARE_VERSION
    COMPATIBLE_VERSION
    1 stby
    stby CONNECTED
    10.2.0.1.0
    10.2.0.1.0
    Thanks and regards,
    shaan

    Hi Deepak,
    Pls see the result from the view, i wanted to delete stby
    SQL> select * from v$asm_client;
    GROUP_NUMBER INSTANCE_NAME
    DB_NAME STATUS
    SOFTWARE_VERSION
    COMPATIBLE_VERSION
    1 prim
    prim CONNECTED
    10.2.0.1.0
    10.2.0.1.0
    2 prim
    prim CONNECTED
    10.2.0.1.0
    10.2.0.1.0
    1 stby
    stby CONNECTED
    10.2.0.1.0
    10.2.0.1.0
    regards,
    shaan

  • Is there any method to export the data from oracle 10g in any format !!!!!

    is there any methods to export the data from oracle 10g in the format of excel or csc or txt or anyother. i already downloaded the sql developer tool but it only exports the data of upto one lakh rows ,but i have two tables of more than 3 lakh and 10 lakh rows respectively.for this i used 'where' command to break the file through sql developer but that didnt work
    plz help me out if any thing possible
    i need to again import this data into microsoft sql if there is any direct method plz let me know
    its urgent
    Message was edited by:
    user628031
    Message was edited by:
    user628031

    Take a look at DUMP_CSV function by Tom Kyte.

Maybe you are looking for