Error while getting  image from database in SUP using ios?

Hi All,
  Im developing native iOS application using sup 2.1.3 . Im getting error While retrieving  image from SUP database. Here i'm trying to get image from database and show in imageView.can any one help me how to fix this issue?
In database image datatype is  'LONG Binary' .
My table Schema:
CREATE TABLE dba.ImagesTable (
RowID INT NOT NULL,
ImageName VARCHAR(20) NOT NULL,
PhotoData LONG BINARY NOT NULL,
IN SYSTEM
ALTER TABLE dba.ImagesTable
  ADD CONSTRAINT ASA137 PRIMARY KEY CLUSTERED (RowID)
ALTER TABLE dba.ImagesTable
  ADD CONSTRAINT ASA138 UNIQUE NONCLUSTERED (RowID)
in Xcode:
            [SUP107SUP107DB synchronize];
            SUP107ImagesTable *imgTable =[[SUP107ImagesTable alloc]init];
            SUP107ImagesTableList *list =[SUP107ImagesTable findAll];
            SUP107ImagesTable * oneRecord =[list objectAtIndex:0];
            NSLog(@"rowId:%d---imageName:%@---photoData:%@---photoLenght:%d",oneRecord.rowID,oneRecord.imageName,oneRecord.photoData,oneRecord.photoDataLength);
            NSData *tempData =[[NSData alloc]init];
            SUPBigBinary *responseBinaryData = (SUPBigBinary *)oneRecord.photoData.value;
            @try {
                [responseBinaryData openForWrite:[oneRecord.photoData length]];
                [responseBinaryData write:tempData];
            @catch (NSException *exception) {
                NSLog(@"exception: %@",[exception description]);
            UIImageView *imgView =[[UIImageView alloc] initWithFrame:CGRectMake(50,50,100,100)];
            [self.window addSubview:imgView];
            UIImage * tempImage =[UIImage imageWithData:tempData];
            imgView.image = tempImage;
            [responseBinaryData close];
Error Log:
2014-04-02 18:42:15.150 SUP102[2873:70b] rowId:1---imageName:Apple---photoData:SUPBigBinary: column=c pending=1 allow_pending_state=1 table=sup107_1_0_imagestable mbo=0x0 key=(null) ---photoLenght:90656
Printing description of responseBinaryData:
<OS_dispatch_data: data[0xc891b40] = { leaf, size = 90656, buf = 0x1213a000 }>
2014-04-02 18:42:33.304 SUP102[2873:70b] -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
2014-04-02 18:42:33.305 SUP102[2873:70b] exception: -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
2014-04-02 18:42:33.305 SUP102[2873:70b] -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40
2014-04-02 18:42:33.306 SUP102[2873:70b] [ERROR] [AppDelegate.m:497] NSInvalidArgumentException: -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40

This thread talks about uploading image to SAP from a IOS device,Sending Image to SAP via iOS Native app (SUP 2.1.3)
Midhun VP

Similar Messages

  • Getting Image from database in crystal report

    Hi Experts,
                         I have a user UDF which has Image datatype. I store all the image in C:\Program Files\SAP\SAP Business One\Bitmaps\   folder.Now i have to show this image in my crystal report. When i tried to pick this image from database it gives me only the name of image with extension like abc.jpg . How could i achive this in crystal report.
    Thanks and Regards

    Hi Om
    As you have the location of the image, you can insert it as an OLE object onto the report.
    Click on Insert -> OLE Object -> specify the path of the image.
    For more information, please refer to Crystal Reports help.
    Regards
    Sourashree

  • Error while sync data from wcs to eclipse using CSDT

    Hi,
    I installaed webcenter 11gR1 in remote location and i installed eclipse indigo in localhost.
    and i connect to the server using CSDT plug-in in eclipse success fully.
    the following error i'm getting while pressing the sync button.
    Error while getting the asset types form webCenter Sites.Please make sure connection information is correct and you belongs to RestAdmin group.
    and when i click on create template button im getting the fallowing error.
    Error occured while getting the site informatino from Webcenter sites: A message body reader for java, class com.fatwire.rest.beans.userBean , and MIME media tlye,text/html; charset=UTF-8, was not found.
    could you please resolve this issue.
    Thanks And Regards
    Rajendar

    david.pai wrote:
    I found the reason. The eclipse plugin - com.fatwire.eclipsecsdt_1.2.jar bundled with current WCSites zip (11gR1BP1) on OTN Download page is 12470 KB. It works only on linux but not on windows. For windows there is another jar (5030 KB) that works fine but it's not exists on OTN Download page, which contains only the GENERIC package.The first one is indeed for version 11gR1BP1(11.1.1.6.1), the second one you mentioned is the one for 11gR1 (11.1.1.6.0). Both should work on windows as well, its just important that you use the right version. Recommended Eclipse is the Helios release.
    Note: Only Sites 11gR1BP1(11.1.1.6.1) supports remote connection with CSDT.
    Cheers,
    Rodney
    Edited by: Rodney on Apr 19, 2013 8:35 AM

  • OBIEE Error while importing table from database

    Hi
    I am getting the following error when i am trying to import table from database.
    [nQSError: 16001]ODBC error state: IM004 code:0 message:
    [Microsoft][ODBC Driver Manager] Driver`s SQLAllocHandle on SQL_HANDLE_ENV failed.
    Any idea y such error.
    Thanks and Regards,
    Andy

    Looks like an error in the ODBC driver, not OBIEE as such.
    Have you tried googling it?
    Can you post details about your OS and DB.

  • Forms 9i: How get image from database?

    Hi!
    I want to get a image (GIF,JPG, TIFF, etc.) that is stored in database table (as blob) in Image_Item (No Database Block) by Trigger (PL/SQL) way.
    In a Block that is database=yes It's OK, the Query do this in automatic.
    I know that "select column into block_item from db_table" is not possible.
    Thanks!

    I have a multi-row block for entry data, so was thinking in a image item (No Database) in the same block for show a GIF when the user entry one code; then I will not need any thing more for show the correct GIF in each row when the user scroll them.
    The other way, if I create one block-image_item for each row that is displaying; then I need create a Procedure por Syncronize the data row with the GIF; this mean a lot re-quering when the user is scrolling the rows. This is the reason I searching one Instruccion equivalent to read_image_file (but in place Operating System from database) or dbms_lob.read( ... ) but the target must be a block image item.
    Thanks.

  • Error while loading data from PSA to DSO using DTP

    Hi,
    I have a Unique aplha numeric identifier of  type "Char" length "32" . When I am loading the data from PSA to DSO using DTP I get the following error message:
    "An error occurred while executing a transformation rule:
    The exact error message is
    Overflow converting from ' '
    The error was triggered at the following point in the program:
    GP4JJHUI6HD7NYAK6MVCDY4A01V 425
    System response
    Processing the data record has been terminated"
    Any idea how I can resolve this....
    Thanks

    Hi,
    fist check weather any special characteristics if not
    check in data source under this we have fields tab check the format of a particular field format internal/external/check u choose internal format, if any check routine once
    use Semantic Groups in the DTP.
    Try  it
    Thanku
    lokeeshM
    Edited by: lmedaSAP_BI on Oct 20, 2010 6:44 AM

  • Error while retrieving data from PL/SQL Table using SELECT st. (Urgent!!!)

    Hi Friends,
    I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
    CREATE or REPLACE PROCEDURE test_proc IS
    TYPE tP2 is TABLE of varchar2(10); --declared a collection
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    While executing the above procedure, I encountered foll. error:
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
    ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [0]
    Can anyone please help me, where the problem is??
    Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
    Thanks in advance.
    Best Regards,
    Jay Raval.

    Thanks Roger for the Update.
    It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
    Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
    I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
    Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
    If someone have any other idea on this, please do let me know.
    Thanks a lot for all help.
    Best Regards,
    Jay Raval.
    You have to define a database type...
    create type tP2 is table of varchar2(10)
    CREATE OR REPLACE PROCEDURE TEST_PROC
    IS
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    This will work.
    Roger

  • Error while running report from Form. i am using Forms 10g.

    dear all,
    here is a problem when running the report from a fom. gives the pollowing error.
    REP-110: Unable to open file 'f:\oracle\accano\gl\coa_list.rdf'.
    REP-1070: Error while opening or saving a document.
    REP-0110: Unable to open file 'f:\oracle\accano\gl\coa_list.rdf'.
    i am using Forms 10g.
    thanks
    Muhammad Nadeem

    See metalink doc id 215469.1
    The purpose of this document is to:
    - provide information on how to resolve the REP-110 error.
    - give hints on how to troubleshoot problem.
    - include a comprehensive summary of various scenarios which may
    result in a REP-110 error

  • Getting error while saving image to database

    hi, i am getting error when i click commit button when i try to save image the message is as
    Cannot create an object of type:java.sql.Blob from type:oracle.jbo.domain.BlobDomain with value:ÿØÿàJFIF``ÿáExifMM*2VGFGI2œ�êô‡ijÔ2009:03
    please help me soon

    hey thanks , but my jdbc pool and driver is fine. what may be the problem and I am not able to change the type to BlobDomain in eo. The type i Blob only may be this is the problem how can I change it to Blob Domain

  • Error while loading image from Windows Phone gallery into my Unity application

    Hi,
    I have developped a Windows Phone plugin for my Unity application which enable me to open the Windows Phone gallery in order to select an image and get its physic path.
    I've used this path to load the image in the application with a WWW object but I get this error
    "Error. Operation has failed with error 0x80070005: access is denied."
    The path is correct because I display it and I've ticked the ID_CAP_MEDIALIB_PHOTO in the WMAppManifest.xml (Capabilities tab).
    Here is my Unity C# test code to load the image with the path.
    IEnumerator loadImage()
    this.guiText.text = filePath;
    WWW www = new WWW(filePath);
    yield return www;
    if(www.error == null)
    GameObject texture = GameObject.Find("UNITY");
    if(texture != null)
    texture.guiTexture.texture = www.texture;
    Any help would be appreciated ! Thanks in advance !

    The error is correct. Your app doesn't have direct access to that path. It can directly load files only from its app data and install directories.
    To load from the libraries I it needs to use the StorageFile to get brokered access.
    The easiest way may be to copy from the library to local data then use WWW to load that. Otherwise you'll probably need to wrap the StorageFile can for use in unity. Unity has such a wrapper in the Unity Engine.WSA namespace that you can try

  • Error while deleting image from picture library

    Facing issue in deleting pictures from picture library from a site collection created in SharePoint 2010 mode in SharePoint 2013.  Though we can open the picture and delete it from 'Delete Item' from the ribbon, we cannot delete the pictures from Actions
    -> Delete option.  
    Here is the exception
    Level:Medium Category: General
    Application error when access /_layouts/DeleteMu.aspx, Error=Object reference not set to an instance of an object.   at Microsoft.SharePoint.WebControls.DeltaPage.LoadPageStateFromPersistenceMedium()    
    at Microsoft.SharePoint.ApplicationPages.DeleteMultipleItemPage.<LoadPageStateFromPersistenceMedium>b__0()     at Microsoft.SharePoint.ApplicationPages.LoadViewStateHelper.LoadViewStateOrNull(Func`1 loadPageStateFunc)    
    at System.Web.UI.Page.LoadAllState()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     

    Hi Shivayogi,
    Whether you migrate SharePoint 2010 to SharePoint 2013, and kept in 2010 mode.
    If yes, please create a new site collection, then test again, compare the result.
    Whether other libraries could work correctly.
    Whether this issue occurres for 2013 mode site collections.
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Fatal Error while retrieving data from Visual Fox Pro using OLE-DB UDS

    Hello all,
    in a customer project we connected a Visual Fox Pro Database via OLE-DB UDS.
    Whenever data is retrieved, a fatal error shows up:
    Fatal Error: Error occurred while processing data stream, null
    Although the data is retrieved correctly!
    MII used: 11.5
    UDS-Server: xMII OLE DB UDS, version 4.0.1.10
    This is the log from the UDS-Server:
    [02/29/2008-11:22:40.195] oleDB [P:4404, T:4792, Framework,   ERROR] 0x0      {extra params}: {5}     [LHDSChannelHandler.cpp @ 488, CLHDSChannelHandler::ExecuteIOCP]
    [02/29/2008-11:22:40.195] oleDB [P:4404, T:4792, Framework,   ERROR] 0x17009     Exception occured: pid = 5, original = 5, data = <ExecutionContext><param name="MODE" value="QUERY"/><param name="QUERY" value="SELECT artikelnr FROM artikel "/><param name="ENDDATE" value="1204280560164"/><param name="ROWCOUNT" value="100"/><param name="STARTDATE" value="1204276960164"/></ExecutionContext>.     [LHDSChannelHandler.cpp @ 493, CLHDSChannelHandler::ExecuteIOCP]
    ********** Start of Exception Stack Trace **********
         1)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792,       UDS, ] 0x0     HRESULT: 0x80004005 [Unspecified error]     [BaseOleDbMode.h @ 1133, BaseOleDbMode<class COleDbQuery>::ProcessDynamicResults]
         2)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792,       UDS, RETHROW] 0x0     Rethrowing exception.     [BaseOleDbMode.h @ 1211, BaseOleDbMode<class COleDbQuery>::ProcessDynamicResults]
         3)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792,       UDS, RETHROW] 0x0     Rethrowing exception.     [Query.cpp @ 107, COleDbQuery::ExecuteOleDbMode]
         4)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792,       UDS, RETHROW] 0x0     Rethrowing exception.     [BaseOleDbMode.h @ 381, BaseOleDbMode<class COleDbQuery>::ExecuteMode]
         5)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792,       UDS, RETHROW] 0x0     Rethrowing exception over COM.     [LHDSUtil.h @ 1086, lhds::LHDSModeImpl<class COleDbQuery,struct ILHDSMode>::Execute]
         6)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792,       UDS, RETHROW] 0x0     Rethrowing exception.     [LHDSUtil.h @ 1124, lhds::LHDSModeImpl<class COleDbQuery,struct ILHDSMode>::Execute]
         7)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792, Framework, RETHROW] 0x0     Rethrowing exception over COM.     [LHDSDispatcher.cpp @ 135, CLHDSDispatcher::CallMode]
         8)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792,       UDS, RETHROW] 0x0     Rethrowing exception over COM.     [LHDSUtil.h @ 893, lhds::LHDataServerImpl<class CLHOleDbDataServer>::Execute]
         9)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792, Framework, ] 0x0     Caught exception over a COM boundry.     [LHDSChannelHandler.cpp @ 566, CLHDSChannelHandler::OnExecute]
         10)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792, Framework, RETHROW] 0x0     Rethrowing exception.     [LHDSChannelHandler.cpp @ 574, CLHDSChannelHandler::OnExecute]
         11)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792, Framework, RETHROW] 0x0     Rethrowing exception.     [LHDSChannelHandler.cpp @ 502, CLHDSChannelHandler::ExecuteIOCP]
         12)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792, Framework, RETHROW] 0x0     Rethrowing exception over COM.     [LHDSChannelHandler.cpp @ 189, CLHDSChannelHandler::Execute]
         13)     [02/29/2008-11:22:40.210] oleDB [P:4404, T:4792,      Host, HANDLED] 0x0     Handled exception.     [ThreadPool.cpp @ 228, ThreadPool::ThreadProc]
    ************** End of Exception Trace **************
    Any help is very much appreciated.
    Regards,
    Matthias
    Edited by: Matthias Wald on Feb 29, 2008 12:12 PM

    Hi Salvatore,
    tried your suggestian but no luck, same error.
    I checked the Version. It shows 4.0.1.10.
    Is there a later version available?
    UDS Settings are (apologize any misspellings):
    Collect Requests                              false
    Log Level                                         Info
    Maximum Concurrent Connections    1000
    Pool Size                                         5
    Port                                                 8087
    Runtime Mode                                  Service
    Service Dependencies                       Eventlog
    Service Passowrd                              *******
    Service Startup                                 Manual
    Service User                                     .\LocalSystem
    Shutdown Timeout                            10
    Stack Size                                       0
    Threading Model                               MTA
    Trusted Requesters                         
    Use IOCP                                        true
    Connection String                            Provider=VFPOLEDB.1;Data Source=D:\Daten;Mode=Share Deny None;Extended Properties="";User ID="";Password="";Mask Password=False;Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE;DSN="";DELETED=True;CODEPAGE=1252;MVCOUNT=16384;ENGINEBEHAVIOR=90;TABLEVALIDATE=3;REFRESH=5;VARCHARMAPPING=False;ANSI=True;REPROCESS=5
    Persistent Connectikon                     true
    Show Affected Rows                         Minimal
    Variant Representation                      String
    I have changed MTA to STA and also tried other admin user for service without luck.
    Any other hints?

  • Error while generating CHM from Framemaker 7.2 using Quadralay webworks 7

    Hi,
    Iam using FrameMaker 7.2 and Quadralay WebWorks 7.0 for generating CHM files. While creating the webworks project I get error: "The Wizard was unable to scan documents". The support / information for this error suggests modifying the maker.ini file. However there is no specific information on what needs to be changed in the maker.ini.
    Quadralay does not support version 7.0 anymore and no support information is available on their site.  I tried to uninstall and install Framemaker 7.2 and webworks 7 as mentioned on the adobe support site here: http://kb2.adobe.com/cps/328/328048.html. However this does not work and I get the same error.
    I urgently require help on this.
    Thanks.

    Hello Michael,
    Iam using Webworks Publisher Professional Edition 7.0.6.1058 and Adobe FrameMaker 7.2 on Windows XP Professional SP2. I made a fresh installation on another computer which now has only WWP PE 7.0.6.1058 and FM 7.2 and no other versions of these s/w.
    I could find some links on this error after creating this thread. http://forums.adobe.com/message/1237326#1237326 .. I tried to change the maker.ini and edit the windows registry following the instructions mentioned in the post. I modified the folder names and paths appropriately. But the error persists.
    Would greatly appreciate help on this as my project deadline is creeping in
    Thanks much,
    CP.

  • ERROR while uploading data from EXCEl to sap using ALSM_EXCEL FUNCION MODULE

    Hi Experts,
    I am uploading excel data into sap suing function module ALSM_EXCEl_TO_INTERNAL_TABLE , used this funcion module in the program while running the program one blank excel sheet is opening and data is not uploading into internal table . even same blank sheet is opeining if we user
    CONVERT_EXCEL_TO_INTERNAL function module also.
    can you please tell me why this error is coming how to over come this error.
    My excel sheet data records are less then 10000.
    Thanks & regards
    kiran

    Hi Taranam,
    Use FM ALSM_EXCEL_TO_INTERNAL_TABLE.
    Regards,
    Atish

  • Display image from database with jspSmart

    Hi
    I have successfully uploaded and saved images into oracle(8.1.5) table DATA_TYPE(dtid number, iconname varchar2(30), icon blob). When I try to display a specific icon in my browser, I get "javax.servlet.ServletException: General error" at:
    PreparedStatement pstmt = myConnection.prepareStatement(mySQL);
    My code looks like this:
    imgModifyDataType.jsp
    <%
    ResultSet myResultSet = null;
    Statement myStatement = null;
    Connection myConnection = null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    myConnection = DriverManager.getConnection("Jdbc:Odbc:Te","te","te");
    String iconName;
    String pDTID = request.getParameter("dtid");
    String mySQL = "Select iconname, icon from data_types where dtid=?";
    PreparedStatement pstmt = myConnection.prepareStatement(mySQL);
    pstmt.setString(1,pDTID);
    myResultSet = pstmt.executeQuery();
    iconName = myResultSet.getString("iconname");
    myUpload.initialize(pageContext);
    myUpload.downloadField(myResultSet,"icon","application/x-msdownload", iconName);
    %>
    I call this JSP from another JSP like this:
    <img src="imgModifyDataType.jsp?dtid=<%=pDTID%>">
    If we cannt display image with the help of another jsp like this then please guide me how to modify the imgModifyDataType.jsp to a servlet because I have never worked in servlets.
    Please help
    Sajid

    I think that it may help you get image from database. I used two jsp page. First one is getphoto.jsp that makes as table based in sql statment and invoke the getimage.jsp this last returns images based on
    the getphoto.jsp PhotoId.
    /** getphoto.jsp source code */
    <%@page import="java.sql.*,oracle.jdbc.*"%>
    <html>
    <head>
    <title>
    jsp1
    </title>
    </head>
    <body bgcolor="#ffffff">
    <table width="781" border="2">
    <tr<<td>
    <td width="83" bgcolor="#C0C0C0"><b>PhotoId</b><td width="450" bgcolor="#C0C0C0"><b>Description</b></td><td width="228" bgcolor="#C0C0C0"><b>Photo Image</b></td>
    <%
    Connection conn = null;
    Statement stmt = null;
    ResultSet rset = null;
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection("jdbc:oracle:thin:@itas:1521:oraITAS","yourDbUserId","yourDbPassword");
    stmt = conn.createStatement();
    rset = stmt.executeQuery("select photo_id,photo_description from photo");
    while (rset.next()) {
         %>
         <tr><td width="83"><%=rset.getObject("photo_id")%></td><td width="450"><%=rset.getObject("photo_description")%></td><td width="228"><img src="getimage.jsp?PhotoId=<%=rset.getObject("photo_id")%>" width="238" height="228"></td></tr>
         <%
    conn.close();
    %>
    </table>
    </body>
    </html>
    /** getimage.jsp source code */
    <%@ page contentType="image/jpeg; chaoResult=iso-8859-1" language="java" import="java.sql.*,java.io.*,java.util.*" errorPage="" %>
    <%
    String strConnString = null;
    Connection oDbConn;
    Statement oStmt;
    ResultSet oResult;
    String strConnection = null;
    String strUserId = "c_erober";
    String strUserPwd = "sybdev99";
    String strDatabase = "oraITAS";
    String strPhotoId;
    strConnString = "jdbc:odbc:" + strDatabase;
    String strSql;
    try {
    strPhotoId = (String) request.getParameter("PhotoId");
    strSql = "select photo_image from photo" + ( (strPhotoId==null) ? " where photo_id = '001'": (" where photo_id = '" + strPhotoId + "'") );
    DriverManager.registerDriver(new sun.jdbc.odbc.JdbcOdbcDriver());
    oDbConn = DriverManager.getConnection(strConnString,strUserId,strUserPwd);
    response.setContentType("image/jpeg");
    oStmt = oDbConn.createStatement();
    oResult = oStmt.executeQuery(strSql);
    oResult.next();
    byte[] bytearray = new byte[4096];
    int size=0;
    InputStream sImage;
    sImage = oResult.getBinaryStream(1);
    response.reset();
    response.setContentType("image/jpeg");
    response.addHeader("Content-Disposition","filename=getimage.jpeg");
    while((size=sImage.read(bytearray))!= -1 ) {
    response.getOutputStream().write(bytearray,0,size);
    response.flushBuffer();
    sImage.close();
    oDbConn.close();
    } catch (SQLException ex) { ex.getMessage();
    %>

Maybe you are looking for

  • Error while trying to add a new field in search criteria by VO extension

    Hi, I am trying to add a new field by using the VO extension to a seeded OAF page used to search Repository contracts. I get the following error on opening the page after I have compiled my code on server and bounced apache. Message not found. Applic

  • Windows ME Photo Transfer to Sleek Ph

    Hello, I have Windows ME and I have been using Windows Media Player 9 to trandfer my music onto my Sleek Photo, but does anyone know of a way that I can transfer photos to my player without Windows XP? Thanks, Rob

  • Patch set 3 - release not file - [SOLVED]

    Hi all. I have no direct access to metalink, so is there someone that can put here or give me a link to release note file of patch set 3 for Oracle Form?? Thanks in advance, Fabrizio Message was edited by: fdellipriscoli

  • Adobe Forms - FormCalc Scripting Question for Image Control

    Hi All, I have three images on my master page. I have a hidden text field. Based on a certain value within this text field I need to turn off Imagefield B and ImageField C and Leave ImageField A visible. I know this can be done via FormCalc scripting

  • Using camera Raw in photoshop CS6

    Hi all, I hope you had a nice christmas and a happy new year to you. I have just re-installed my Photoshop CS6, only to find "Open in camera Raw" is not showing as an option under the file drop down menus. Any Ideas? Has anyone got an explanation or