Blob Problem (storing Images)

AOA!
I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
Please help us in this regard. We will be thankfull to you.
Usman Rana
Dont reply to above mantioned email my actual email account is [email protected]

I think that both your SQL is wrong and your intended use is wrong. According to the SQL reference, the following seems to be a simplified definition that seems to match what you're trying to do. UPDATE <table> SET <column> = <expr>. So PROPERTIES should be a <table> of some kind and X should be a <column> of that table. This changes your PreparedStatement to *"UPDATE PROPERTIES SET X = ? WHERE NAME = ?"* Then you can do ps.setBlob(1, b) and ps.setString(2, ...). Because your statement is DML you must do ps.executeUpdate(). So your code might look something like this.
Blob b = ...;
String x = ...;
ps = c.prepareStatement("UPDATE PROPERTIES SET X = ? WHERE NAME = ?");
ps.setBlob(1, b);
ps.setString(2, x);
int i = ps.executeUpdate();
The executeUpdate() returns the row count (i.e. number of rows) of your DML statement. Try that and see if it helps.

Similar Messages

  • Blob problem (Image storing or Currupted )

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    hello,
    these are very specific questions about forms and reports functionality. i would suggest you publish this
    question in the forms and reports forum.
    regards,
    philipp

  • BLOB problem (image storing or image curruption)

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    hello,
    these are very specific questions about forms and reports functionality. i would suggest you publish this
    question in the forms and reports forum.
    regards,
    philipp

  • Blob Problem (image not store or currup in database)

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana

    I have a mistake , the right code is :
    <listobject:create name="mylist" columns="field,value" />
         <listobject:addrow name="mylist">
              <listobject:argument name="field" value="historyAttr1" />
              <listobject:argument name="value" value="1234" />
         </listobject:addrow>

  • Problem w/ image item using 9i BLOB field and InterMedia ORDImage Object

    Hi,dear all,
    I have a problem with image item in Form 6i. Oracle 9i is used as backend DB, and a table contains image data is created for testing:
    create table image_test(
    id number,
    image blob
    In Form 6i, there is no problem to create a block for inserting/updating the image record into the database. However, it can not be used to retrieve image (blob field), the image item remains empty after 'execute query', while the id field can be retrieved. When the same table is created in Oracle 8.1.7, and the exact same form can be used without any problem both in inserting and retrieval. It seems that the Oracle 9i does not use the same way to store BLOB column. Has anybody ever encountered this problem? How to retrieve image (BLOB) in Form 6i from Oracle 9i?
    I tried to use interMedia ORDImage as the data type in Oracle 9i, that is,
    create table image_test(
    id number,
    image ORDSYS.ORDImage
    Same problem, the form can insert record with image, but when retrieving, nothing displayed. Anybody could help! Thanks in advance!

    hi!
    well working with oracle8i and form6i.
    same problem..but i used (instead of blob or clob as datatype..) Long raw..
    it can be saved as usual..i mean Commit..
    and can be retrieved..using Execute_Query..its working fine..
    well if anybody get any other solution..do inform..
    mail_id:
    [email protected]

  • Storing Images In Oracle 9.2 Using Forms 6i

    When my database was 8.1.7, storing Images in the database in BLOB field worked fine through Form 6i. But when the database was upgraded to 9.2 then the images are not loaded in the database through Forms 6i.
    Kindly help
    Thanks

    Hi,
    I wanted to do the same thing and faced the same problem. I'm working on Forms 6i and Oracle 9i as backend.
    When an Image item is created on forms, it's datatype is set to Long Raw. You can see this by changing the type of the image item to text item. You'll see that the datatype is Long Raw. The idea of inserting the image would work perfectly if you set the datatype of the column to Long Raw in the backend.
    For using BLOB... I searched alot but all in vain. No answer as to how to handle BLOB in Forms 6i.
    Do let me know if you get a way out.

  • Problems w/ Images in Reports 2.5

    I seem to have run into an apparent limitation with the Oracle Developer
    2000 Report Designer 2.5. I have an image that is displayed, the path being
    stored within the database, the image is then Read from file. This works
    fine except there are two problems that I have run into and hope somebody
    can either confirm this is the way the software functions or point me in the
    right direction.
    It seems impossible to me to get the image to center within the field as
    defined in the Report Layout. I have the image field on the report set to
    about 10 Inches wide. Initially the image appeared on the left hand side of
    the field, I changed the alignment to Center as you would for a text field
    but to no avail, the image always comes back on the left hand side.
    If the images where all of a uniform size this would not bother me as I
    would simply create the image box based upon the size of the image and
    center it on the report, alas this is not an ideal world. How can I center
    an image within a field ? Is it even possible.
    Thing brings me onto my second problem, the images stretch to fill the image
    field, stopping when it either hits the horizontal or vertical boundary.
    This is great in a way because oversized images are zoomed into and appear
    fine, the whole process does not mess with the aspect ratio's of the images
    at all. However with images much smaller than the image field, they are
    stretch way to much and become pixilated and an eyesore. I have tried
    playing with the Variable, Can Shrink, Can Grow features but I lose all
    control of where the image will wind up with varying results. The Expand,
    Contract properties have little effect, the variable option shrinks all
    images down to the tiniest of thumbnails and then again they appear to the
    left of center. Somebody has to have done this before.
    Any idea how I can control this behavior ? And maybe just have an image
    appear at its actual size ?
    Combined these two factors make the report shabby, and this is intended as
    presentation quality material.
    Any guidance, advice is appreciated.
    Thanks,
    James
    James Starritt
    null

    Hello,
    Is there any particular reason you cannot upgrade to Reports 6i? Reports 2.5 is quite old, and there have been a number of issues resolved with images since then.
    Regards,
    The Oracle Reports Team --skw                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to read the stored images

    hi
    i have images in my table img,
    i want to know how toretreive that stored image

    i have images in my table img
    > i want to know how toretreive that stored image
    How to retrieve it depends on how it is stored? What is the data type? Is it perhaps a blob (large object in binary format)? If so check out the package dbms_lob and read Application Developer's Guide - Large Objects. If not connect to your database using sql plus to publish the data type for the image column from the command "describe img".

  • Still having problems with images

    I am still having problems putting images into an Oracle 9i database and fetching them back out.
    I think I have finally managed to force a blob image into the database, but can't seem to get it back out into a byte array.
    After many iterations, I have come up with something that might be getting close.
    The code is listed below.
    Everything has been simplified as much as I can.
    The function get_user_picture_func1 returns a single blob for a specified index.
    In this case, I have hardcoded the index = 3 and I think there is an image in the database for that index. (it says there are bytes there anyway).
    The byte array to store the image is defined outside the method fetchImage().
    byte[] imageData;
    When I call fetchImage() I get the following exception:
    Invalid argument(s) in call: getBytes().
    at the line
    imageData = picture.getBytes(zro, k);
    It looks like getBytes has two parameters, Long offset, int length.
    I had diagnostic statements and I confirmed that the statement:
    int k = (int)picture.length(); returned k=4198 (the same size as the image).
    I am at a loss to understand what the exception is trying to tell me.
    I'be been trying to get this to work for a week now and am really getting burned out trying to find anything that works.
    void fetchImage()
    Blob picture;
    String query = "{ ? = call get_user_picture_func1( ? ) }";
    try
    CallableStatement cs = con.prepareCall( query );
    cs.registerOutParameter(1, OracleTypes.BLOB);
    cs.setInt(2,3);
    cs.execute();
    picture = cs.getBlob(1);
    if( picture != null)
    InputStream in = picture.getBinaryStream();
    int k = (int)picture.length();
    imageData = new byte[k];
    long zro = 0;
    imageData = picture.getBytes(zro, k);
    catch( Exception e)
    }

    I have been using my iPad mini with keynote to make slide presentations in  my classes.There has been no problem until I upgraded to Keynote 5.3. Now the refresh rate on the iPad mini is so slow and out of sync with the projected image that I was forced to not use keynote! I have 2 years of work invested that I will have to toss unless this gets fxed. I have not had this problem with this equipment/files before. Only change was upgrade to keynote 5.3. ( Some details: I connect to the projector with a  VGA cable and Apple lightining adaptor to the iPad Mini. All updates current on theiPad Mini.)  Yes I did turn on and off all equipment. And I did check all cable connections. Thanks for any help you may give!

  • Problem with images in swing

    I have a game that uses images. Ive created imageIcons and Jlabels, and it all works fine with the full path name of the image file such as
    static String fgFile = "C:/Documents and Settings/Gareth/My Documents/My Uni Work/rocket.gif";but when i try to make the program look in another folder (where the image is also stored) images using the folowing code it does not work.
    static String fgFile = "/Image/rocket.gif";i have also tried putting ./ and ../ as advised by a friend but nothing works.
    The game works fin on my computer but i need to make it work when on a CD
    please help

    Fixed files like images should always be picked up with getResource() e.g.
    ImageIcon rocket = new ImageIcon(getClass().getResource("rocket.gif"));That will look for the rocket.gif file from the classpath, just the way it looked for the .class file of the class in which it occurs. If you put the rocket.gif in the same place as the class file it'll always find it, even if it's in a jar or on-line.
    getResource returns a URL but the image loading functions all accept URLs for this very reason.

  • Problem with Image file

    Hi,
    Iam facing with one problem.I have one swing interface through which I can upload files(back end servlet programme).Now I can upload all types of file but problem with image file it uploading perfectly that means size of the uploaded file is ok but its format damaged.It can not be open.My backend servlet programme is ok coz i tested it with html form it is working perfectly.Problem with swing interface.Plz guide me where I done a mistake.Below r my codes:-
    ImageIcon Upload=new ImageIcon("images/Upload.gif");
         Button=new JButton(Upload);
         Button.setToolTipText("Upload");
    Button.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
              int returnVal = fc.showOpenDialog(ActionDemo4.this);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
              File file = fc.getSelectedFile();
    String aa=file.getAbsolutePath();
              textArea3.append(aa);
                   textArea2.append("Local URL:");
    long l=file.length();
              try
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff);
              String str1=textArea10.getText();
    url = new URL ("http://127.0.0.1:7001/servletUpload?x="+str1);
         urlConn = url.openConnection();
         urlConn.setDoInput (true);
         urlConn.setDoOutput (true);
         urlConn.setUseCaches (false);
         urlConn.setRequestProperty("Content-Type","multipart/form-data;boundry=-----------------------------7d11e410e500f2");
         printout = new DataOutputStream (urlConn.getOutputStream ());
    String content ="-----------------------------7d11e410e500f2\r\n"+"Content-Disposition: form-data;"+"name=\"upload\"; filename=\""+aa+"\"\r\n"+"Content-Type: application/octet-strem\r\n\r\n\r\n"+conffile+"-----------------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);
    printout.flush ();
    printout.close ();
    Best Regards
    Bikash

    The errors are here:
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff); (conffile is a String object containing the image)
    and here:
    String content ="-----------------------------7d11e410e500f2\r\n"+"Con
    ent-Disposition: form-data;"+"name=\"upload\";
    filename=\""+aa+"\"\r\n"+"Content-Type:
    application/octet-strem\r\n\r\n\r\n"+conffile+"--------
    --------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);conffie is sent to the server but
    it's non possible to treat binary data as String!
    Image files must be sent as byte[] NOT as String ......

  • I just installed my CS5.1 on my new Lenovo Laptop Win 8.1. Problem -- On Image Adjustments none of the adjustment options respond.

    I just installed my CS5.1 on my new Lenovo Laptop Win 8.1. and everything worked for a day. On day 2 I ran into Problems -- On > Image >Adjustments none of the adjustment options respond. None of the toolbar functions such as >Crop etc respond.
    I then installed the same download on my PC and everything works as it should.
    Can anybody help please
    Roland

    Notebook Info
    1 x Lenovo G710 Notebook, Intel® Core™ i5, 43,9 cm (17,3 "), 1000 GB HD,
    Intel Core i5-4210M 2,60 GHz, (Turbo-Boost 2.0 bis 3,20 GHz)
    43.9 cm (17.3") 900p (HD+) LED-Display (1600 x 900)
    8192 MB DDR3-RAM
    Harddisk: 1000GB SATA
    NVIDIA N15V-GM mit 1GB DDR3
    Prefs
    As per download settings, I changed nothing
    Image Info
    Jpg conv.from RAW Canon, dim. 4746x3567, 6,64 Mb
    The software worked on the first day, problems appeared next day. I uninstalled and deleted the exe.file, then redownloaded and reinstalled but same problem persists.
    I then downloaded and installed on my PC and everything works.
    Regards Roland

  • Problem with images opened in Photoshop CS 5

    Hi, I have a problem with images that I open in Photoshop CS 5. F. ex. I opened
    the following image:
    The image appears with a purple color in Photoshop. If I hover over the image
    with a tool like lasso, it temporarily regains it´s original color. The image mode is RGB Color, 8 Bits/Channel.
    I resetted the start settings of Photoshop with the CTRL-Shift-Alt-combination, which had no effect.

    The confusion arises from the imprecise error message in the Preferences > Performance dialog box, to wit:
    OK, that seems to be open to misunderstanding indeed.
    The video card: Citrix Systems Inc. Display Driver.
    Could not find a list for CS6 specifically, but the card may fall short.
    http://helpx.adobe.com/photoshop/kb/tested-video-cards-photoshop-cs5.html
    If I invoke View > Proof Colors, the only thing that changes is that the text in the brackets
    Also if you set View > Proof Setup to something different?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by keeping command-alt-shift/ctrl-alt-shift pressed while starting Photoshop, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)?

  • Mosaic problem with image after Yosemite

    I'm using CS6 (13.0.6) on my iMac and recently upgraded to Yosemite.  I'm now getting a problem where images will suddenly either go black or get a weird mosaic/jigsaw type of look.  In the example below, the "source" images used in the mosaic were files that I had recently closed - so it isn't just a scrambled version of the correct image (if that makes sense).
    Once this happens, the only fix is to close out Photoshop and start over.  Anyone else having this problem?  Any fixes?
    Thanks for any help or suggestions!

    Interesting…Turning off "Use Graphics Processor" returns the magnifying glass to previous Photoshop method of dragging a marquee to zoom, instead of zooming from the point of click.
    So, this is February 2. You say it is Apple's problem and they are working on it, huh? It's been at least two months, apparently. It doesn't seem to be a top priority.

  • Problem with image url

    Hello,
    today I have a problem with image url. I wanted Image to change when mouse dragged over it. But nothing happened. Any ideas?
    def maxIco: ImageView = ImageView{
    image: Image{
    url: "{__DIR__}ikony/max.png"
    onMouseDragged: function(event: MouseEvent){
    maxIco.image = Image{
    url: "{__DIR__}ikony/max2.png"
    }

    This is working for me:
    src/main/Main.fx
    src/main/icon/image1.bmp
    src/main/icon/image2.bmp
    //Main.fx
    package main;
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.input.MouseEvent;
    var changed = false;
    def imgView: ImageView = ImageView {
        image: Image {
            url: "{__DIR__}icon/image1.bmp"
        onMouseDragged: function (e: MouseEvent): Void {
            if (not changed) {
                imgView.image = Image {
                    url: "{__DIR__}icon/image2.bmp"
                changed = true;
                println(imgView.image.url);
        onMouseReleased: function (e: MouseEvent): Void {
            imgView.image = Image {
                url: "{__DIR__}icon/image1.bmp"
            changed = false;
            println(imgView.image.url);
    Stage {
        title: "ImageTest"
        scene: Scene {
            width: 700
            height: 600
            content: [
                imgView
    }I've changed few things to switch image only one time on mouseDragged event.
    It print the image URL.

Maybe you are looking for

  • Server does not start using Sun Java SE 1.5.0_07

    The application server launched with startserv using Sun Java SE 1.5.0_07 , seems to hang (uyner SuSE Linx 10.1), it does not start, and stays forever in startserv. performing a kill -3 for the precess we have: "process reaper" daemon prio=1 tid=0x08

  • How much does it cost to preorder the iphone 6?

    How much does it cost to preorder the iphone 6? How much does it cost to preorder the iphone 6?

  • Always wanted to use apple mail but found set up daunting...

    can someone walk me through setting up an email account using mail???

  • Major problems after updating

    Greetings all, have been spending a lot of time reading and trying this and that to fix this issue with out having to post a thread about it, but here we are. I performed updates on 4/27, before doing so, I created an image of my Arch partition like

  • Client notification and/or permission?

    Does anyone know if ARD 3 offers a better notification system for when clients are being controlled/observed? The current option of showing status in the menu bar is not as obvious as I would like. Ideally, a permission dialog would be available to r