What is the best way to Insert BLOB in DB?

Hi,
We are having a Table containing BLOB datatype & trying to populate it using JDBC. But simple insert is not allowing us to insert the data into table. As the alternative we used to firstly insert a empty_blob & later on update it using FOR UPDATE query resultset. This update operation is quite costly for our application & thus resulting in the drop of performance. Kindly suggest a better way to do the operation in a less costly & standard way.
Thanks in advance.

Ciao Giovanni,
I thank you for your reply. We are already using JDBC driver version 10.2. Please refer to the extract from the driver jar file (OJDBC14.jar):
Created-By: 1.4.2_08 (Sun Microsystems Inc.)
Implementation-Title: ojdbc14.jar
Specification-Vendor: Oracle Corporation
Specification-Version: Oracle JDBC Driver version - "10.2.0.1.0"
Implementation-Version: Oracle JDBC Driver version - "10.2.0.1.0"
Implementation-Vendor: Oracle Corporation
Implementation-Time: Wed Jun 22 11:19:45 2005
The insertion is done in two steps:
1.     First , enter an empty blob (Refer to the following prepared statements in Java):
sFirst.setString(1, id);
sFirst.setInt(2, 0);
sFirst.setString(3, pid);
sFirst.setBlob(4, BLOB.getEmptyBLOB());
sFirst.execute();
2.     Second, do a select for update
Please help.
Regards.

Similar Messages

  • In Acrobat Professional 8, what is the best way to insert/combine multiple pdf's together in a large

    In Acrobat Professional 8, what is the best way to insert/combine multiple pdf's together in a large volume?
    We have 300 pdf reports and need to insert a 2 page cover page infront of each report. Not sure if Batch processing is best???
    Thanks for any tips.

    Probably each cover page is different too. I would probably just bite the bullet and do each individually. I would create the 2 cover pages in WORD or other word processor and print to cover.pdf. Then open a PDF and Pages>Insert Pages or the cover.pdf to the front of the open PDF and save as to the current PDF. Then repeat 299 times. Each time you would make the appropriate change to the DOC file and print a new cover.pdf file (you might want to turn off open in Acrobat for this processing in the printer properties to save time). Probably a good idea to keep a list of the files to check off what has been done (you can generate a list in DOS by Start>cmd, change the directory to your location [cd path], and do "dir >>list.txt". That will give you a list to use.). There may be an easier way, but by the time you get it figured out you might be done this way.

  • What is the best way of insertion using structured or binary type in oracle

    what is the best way of insertion using structured or binary type in oracle xml db 11g database

    SQL*Loader.

  • What is the best way to insert massive data into an existing excel file?

    dear gurus,
    i am wondering that what is the best way to insert massive data into an existing excel file, more performance perspective.
    the file is read from BDS , and we want to insert data into it .
    the way i can think of is
    1. OLE AUTOMATION
       i think performance will be a big problem
    2. Office integration
        i am not sure it's facing the same performance issue ?
    3 . XXL_SIMPLE_API/FULL_API
        I am not sure whether they can insert data into an existing excel file?
    could you please give me some advices?
    br.
    jun

    Hi,
    If you want to APPEND data( add data to an existing excel file) from SAP, then use GUI_DOWNLOAD fm with APPEND = 'X' paramter.
    Best regards,
    Prashant

  • What's the best way to insert a long raw using OracleXSU12?

    I am currently reading a string from a document file and dump the content in a field in a row in a rowset in the xml file. I am just wondering if there is a better way to do this using the name of the text file instead. Thanks.
    null

    (1) you can't insert a sheet in Pages. Only tables !
    (2) before pasting your table in Pages, you may resize it so that it may fit in a page.
    (3) the users which took time to look in Pages User Guide are aware of a feature described as : Linking Text Boxes.
    It's a good answer to your problem.
    In a Word Processor document, create a text box and paste your table in the new tex box.
    At the bottom of the box you will see a small square with a symbol plus. It's a flag warning you  that the box contents is too large for the box.
    No problem, insert a page break to force the opening of a new page then read carefully the user guide :
    Applying what I highlighted, you will create a new box linked to the first one so that your table will flow in it.
    If it's not sufficient, you may link a third box …
    More, we are allowed to rotate the text boxes so you may edit them a way allowing them to host your landscape table.
    From my user's point of view, it's absolutely intuitive.
    Yvan KOENIG (VALLAURIS, France) dimanche 26 juin 2011 21:29:56
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • What's the best way to insert a numbers sheet into pages?

    I have some spreadsheets in numbers that I want to insert in pages...somehow it's not so intuitive.
    First of all when I paste them in a pages text box...a part of the sheets fall off the botom of the page
    Even a bigger problem...The should be in landscape...while all my text is in portrait...
    Anybody?
    Thx.

    (1) you can't insert a sheet in Pages. Only tables !
    (2) before pasting your table in Pages, you may resize it so that it may fit in a page.
    (3) the users which took time to look in Pages User Guide are aware of a feature described as : Linking Text Boxes.
    It's a good answer to your problem.
    In a Word Processor document, create a text box and paste your table in the new tex box.
    At the bottom of the box you will see a small square with a symbol plus. It's a flag warning you  that the box contents is too large for the box.
    No problem, insert a page break to force the opening of a new page then read carefully the user guide :
    Applying what I highlighted, you will create a new box linked to the first one so that your table will flow in it.
    If it's not sufficient, you may link a third box …
    More, we are allowed to rotate the text boxes so you may edit them a way allowing them to host your landscape table.
    From my user's point of view, it's absolutely intuitive.
    Yvan KOENIG (VALLAURIS, France) dimanche 26 juin 2011 21:29:56
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • What's the best way to insert/update thousands records in multiple tables

    Can anyone give an example of how to insert/update thousands records in multiple tables on performance wise? or what should I do to improve the performance?
    Thanks
    jim

    You can see a set of sample applications in various scenarious available at
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html

  • I have some custom html5 tables, what's the best way to insert them in to Captivate 8?

    I have four html5 tables styled using css. They function perfectly in a browser - how do I get them into a Captivate slide?

    Hey, I think I’ve managed to crack it. So, I compressed my .html files to zip files. The HTML5 animation feature allows you to import zip files. So I imported the zip files into a Captivate slide and published the project to my desktop. On viewing it worked perfectly – maintaining all CSS. Perfect.
    Thanks for the help,
    Dan

  • What is the best way to create E-Flyers and insert to Microsoft Outlook??

    What is the best way to create E-Flyers and insert to Microsoft Outlook??

    http://kb.mailchimp.com/article/how-to-code-html-emails
    Once created, the HTML document cab be placed in the Stationery folder.
    On a PC it's here.
    "C:\Program Files\Common Files\Microsoft Shared\Stationery"

  • What is the best way to import a graphic? & How do I create a text frame for a figure caption?

    Hello all! I've been working from the FM book for almost 2 hrs trying to figure this out, so now I need your help. I am almost to this point:
    Problem I: Importing a graphic
    First of all, which is the best way?
    -Insert an anchor frame and then import the graphic into the frame OR
    -Just insert the graphic and get the anchor frame by default
    Here’s my importing and sizing problem:
    I hit ENTER to make a new paragraph line (side note: the book says make a new paragraph by hitting ENTER, import the graphic, and then ESC m+p to shrink wrap so that you can avoid the graphic overlapping the above text. I do exactly this (I believe), but my graphic still overlaps the above text when I shrink wrap. What the...?)
    I insert an anchored frame with position Below Current Line and alignment CENTER (I chose to the insert anchor frame, since this way I have control over its alignment, correct?)
    Anchor frame is selected when I import my image file
    In the Imported Graphic Scaling box, what do I select if my file is HUGE (3072x2304)?
    -Fit in selected rectangle (when I choose this the image imports small and fits in the anchored frame with lots of white space around it)
    -72 dpi
    -75 dpi
    -150 dpi
    -300 dpi
    -Custom dpi: 96 (I’ve tried changing this to a smaller number (20) and I get a message that says “cannot handle a bitmap of that size.”)
    I’ve had the best luck with selecting FIT IN SELECTED RECTANGLE, and then I just scale the image with my shift+click. If I choose 72 dpi or Custom, my image imports HUGE, and I just can’t manage it. I don’t have a method for resizing these images outside of FM.
    Problem II: Creating a text frame for a caption
    Once I have chosen FIT IN SELECTED RECTANGLE, I try to insert a text box underneath the image (and inside the anchor frame) to type a caption in it.
    In Create New Text Frame box, the default is Number 1 and Gap 0.25. I click SET.
    Next, I double-click inside the text frame to begin typing, but the cursor is OUTSIDE and UNDERNEATH the text frame! What the heck??? I’ve done this before and it has worked just fine. Then I had another problem where when I did get the text inside the text frame, I would select the text frame to move it, and it left the text behind! (I moved the frame but the text was separated from it and left behind.)
    THANK YOU in advance for your help. I hope I wrote this out clearly enough. I appreciate those who respond. P.S. I'm in FM 10.

    My favorite method is to use a one-cell table for graphics and captions.
    Import the graphic by reference into the table cell. Create a "Caption"
    paragraph tag and assign it to the table title. (The title can be set
    for above or below the table cell. I prefer below.) Now, whenever you
    insert this table, it will be ready for graphic and caption. Another
    advantage of this method is that graphic and caption always stay
    together at page/column breaks.
    When you create the table format above, assign it to have a -2.0 space
    above. Then, create a paragraph tag, such as "TableAnchor" and assign it
    -2.0 pt font size and -2.0 space below. (You can substitute a different
    point size, but it must be the same in all three places. The TableAnchor
    paragraph will hold the table and these settings let tables fit against
    the top margin where necessary. Otherwise, they dip down a bit.
    I wrote this from memory, so I hope I remembered all the steps!

  • What is the best way of dealing with an "implicit coercion" of an array to a sprite?

    Hello everyone!
         With continued help from this forum I am getting closer to having a working program. I look forward to being able to help others like myself once I finish learning the AS3 ropes.
         I will briefly explain what I am trying to achieve and then follow it up with my question.
    Background
         I have created a 12 x 9 random number grid that populates each cell with a corresponding image based on each cell's numeric value. I have also created a shuffle button that randomizes the numbers in the grid. The problem I am running into is getting my button-click event to clear the current images off the grid in order to assign new ones (i.e. deleting the display stack objects in order to place news ones in the same locations).
    Question
         My question is this: what is the best way to handle an implicit coercion from an array to a sprite? I have pasted my entire code below so that you can see how the functions are supposed to work together. My trouble apparently lies with not being able to use an array value with a sprite (the sprite represents the actual arrangement of the grid on the display stack while the array starts out as a number than gets assigned an image which should be passed to the sprite).
    ============================================================================
    package 
    import flash.display.MovieClip;
    import flash.display.DisplayObject;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.utils.getDefinitionByName;
    public class Blanko extends MovieClip
          // Holds 12*9 grid of cells.
          var grid:Sprite;
          // Holds the shuffle button.
          var shuffleButton:Sprite;
          // Equals 12 columns, 9 rows.
          var cols:int = 12;
          var rows:int = 9;
          // Equals number of cells in grid (108).
          var cells:int = cols * rows;
          // Sets cell width and height to 40 pixels.
          var cellW:int = 40;
          var cellH:int = 40;
          // Holds 108 cell images.
          var imageArray:Array = [];
          // Holds 108 numerical values for the cells in the grid.
          var cellNumbers:Array = [];
          // Constructor calls "generateGrid" and "makeShuffleButton" functions.
          public function Blanko()
               generateGrid();
               makeShuffleButton();
      // Creates and displays the 12*9 grid.
      private function generateGrid():void
           grid = new Sprite;
           var i:int = 0;
           for (i = 0; i < cells; i++)
                cellNumbers.push(i % 9 + 1);
           trace("Before shuffle: ", cellNumbers);
           shuffleCells(cellNumbers);
           trace("After shuffle: ", cellNumbers);
           var _cell:Sprite;
           for (i = 0; i < cells; i++)
                // This next line is where the implicit coercion occurs. "_cell" is a sprite that tries
                   to temporarily equal an array value.
                _cell = drawCells(cellNumbers[i]);
                _cell.x = (i % cols) * cellW;
                _cell.y = (i / cols) * cellH;
                grid.addChild(_cell);
      // Creates a "shuffle" button and adds an on-click mouse event.
      private function makeShuffleButton():void
           var _label:TextField = new TextField();
           _label.autoSize = "center";
           TextField(_label).multiline = TextField(_label).wordWrap = false;
           TextField(_label).defaultTextFormat = new TextFormat("Arial", 11, 0xFFFFFF, "bold");
           _label.text = "SHUFFLE";
           _label.x = 4;
           _label.y = 2;
           shuffleButton = new Sprite();
           shuffleButton.graphics.beginFill(0x484848);
           shuffleButton.graphics.drawRoundRect(0, 0, _label.width + _label.x * 2, _label.height +
                                                _label.y * 2, 10);
           shuffleButton.addChild(_label);
           shuffleButton.buttonMode = shuffleButton.useHandCursor = true;
           shuffleButton.mouseChildren = false;
           shuffleButton.x = grid.x + 30 + grid.width - shuffleButton.width;
           shuffleButton.y = grid.y + grid.height + 10;
           this.addChild(shuffleButton);
           shuffleButton.addEventListener(MouseEvent.CLICK, onShuffleButtonClick);
      // Clears cell images, shuffles their numbers and then assigns them new images.
      private function onShuffleButtonClick():void
       eraseCells();
       shuffleCells(cellNumbers);
       trace("After shuffle: ", cellNumbers);
       for (var i:int = 0; i < cells; i++)
        drawCells(cellNumbers[i]);
      // Removes any existing cell images from the display stack.
      private function eraseCells(): void
       while (imageArray.numChildren > 0)
        imageArray.removeChildAt(0);
      // Shuffles cell numbers (randomizes array).
      private function shuffleCells(_array:Array):void
       var _number:int = 0;
       var _a:int = 0;
       var _b:int = 0;
       var _rand:int = 0;
       for (var i:int = _array.length - 1; i > 0; i--)
        _rand = Math.random() * (i - 1);
        _a = _array[i];
        _b = _array[_rand];
        _array[i] = _b;
        _array[_rand] = _a;
      // Retrieves and assigns a custom image to a cell based on its numerical value.
      private function drawCells(_numeral:int):Array
       var _classRef:Class = Class(getDefinitionByName("skin" + _numeral));
       _classRef.x = 30;
       imageArray.push(_classRef);
       imageArray.addChild(_classRef);
       return imageArray;
    ===========================================================================
         Any help with this is greatly appreciated. Thanks!

    Rothrock,
         Thank you for the reply. Let me address a few things here in the hopes of allowing you (and others) to better understand my reasoning for doing things in this manner (admittedly, there is probably a much better/easier approach to what I am trying to accomplish which is one of the things I hope to learn/discover from these posts).
         The elements inside my "imageArray" are all individual graphics that I had imported, changed their type to movie clips using .Sprite as their base class (instead of .MovieClip) and then saved as classes. The reason I did this was because the classes could then be referenced via "getDefinitionByName" by each cell value that was being passed to it. In this grid every number from 1 to 9 appears randomly 12 times each (making the 108 cells which populate the grid). I did not, at the time (nor do I now), know of a better method to implement for making sure that each image appears in the cell that has the corresponding value (i.e. every time a cell has the value of 8 then the custom graphic/class "skin8" will be assigned to it so that the viewer will be able to see a more aesthetically pleasing numerical representation, that is to say a slightly more fancy looking number with a picture behind it). I was advised to store these images in an array so that I could destroy them when I reshuffle the grid in order to make room for the new images (but I probably messed up the instructions).
         If the "drawCell" function only returns a sprite rather than the image array itself, doesn't that mean that my "eraseCells" function won't be able to delete the array's children as their values weren't first returned to the global variable which my erasing function is accessing?
         As for the function name "drawCells," you have to keep in mind that a) my program has been redesigned in stages as I add new functionality/remove old functionality (such as removing text labels and formatting which were originally in this function) and b) that my program is called "Blanko."
         I will try and attach an Illustrator exported JPG file that contains the image I am using as the class "skin7" just to give you an example of what I'm trying to use as labels (although it won't let me insert it here in this post, so I will try it in the next post).
    Thank you for your help!

  • What is the best way to do an upsert

    Hi all,
    I am new to transaction system. Need help on a requirement.
    We have a requirement where we have to do an update else insert into a table.
    The input data comes from a file and the number of rows should be around 100000 at a time.
    The table may contain around 5 million rows. We have to search the table based on nine columns.
    What is the best way to do it?
    1. A merge or update statement takes hours to complete.
    2. Is there any way we can improve the performance? I have tried using index on the nine columns of the table, but the merge statement doesn't use the index, although I am not sure creating an index is going to help here.
    Thanks.

    2. Is there any way we can improve the performance?Possibly, but first you need to identify where time is actually being spent.
    Personally I would start by using separate UPDATE & INSERT statements &
    the SQL_TRACE=TRUE & then process trace file using TKPROF

  • What is the best way to make my file in FCPX Compatible for a DVD.

    I am working with a file that is about 53 minutes in length.  The video is broken up into 14 3to5 minute videos.  During my project, as I completed each video, I saved a master file and shared as APPLE PRO RES so that I wouldnt lose anything as this is my first time working with FCPX.  This made a hi-def quicktime file of each video (came out great). Now I need to put the entire project together.  My individual master files are about 4g a piece and I would imagine putting them together, will be way too large to make a dvd with.
    My question is what is the best way to put it all together and export/share? I have all of the original projects still in FCPX, do i copy and paste them into one big file? Then share, and If I share what format should i share with?  I need to take the file, throw it on a external HD and put on my laptop to create the DVD in IDVD. Needs to be decent quality for the DVD.  I have read that I can create a DVD right from FCPX, but that would be impossible as I am working on a new imac with no burner!
    ANY HELP WOULD BE GREATLY APPRECIATED!

    jpqb48 wrote:
    My question is what is the best way to put it all together and export/share? I have all of the original projects still in FCPX, do i copy and paste them into one big file? Then share, and If I share what format should i share with?
    All sounds good.
    Create a new project and paste your 14 videos (projects) sequentially into it, Perhaps insert a gap clip and put in chapter markers if you want. Share>DVD. Should create a high quality disk.
    Good luck.
    Russ

  • What is the best way to get a tune created in GB for iPad into iMovie for iPad?

    What is the best way to get a tune created in GB for iPad into iMovie for iPad?

    Haven't done it myself, but seems like the correct workflow would be:
    From GarageBand (iOS), My Songs -> select song -> Send to iTunes
    From iMovie HD (iOS), My Project -> Insert Media -> select by song name
    I'm not sure if GB creates its own playlist for tagging exported songs in your iTunes library so selecting by name would be the next-best method.
    Have you tried this?

  • What is the best way to format a novel w headers  w/o changing the ...

    what is the best way to format a novel w headers w/o changing the following pages. I've used Microsoft office initially, but publishing house uses a program called word perfect. I find that I have too many blank white pages no matter what i do! Have to fix pagination as well...Paul

    When you start you are offered templates under 2 categories "Word Processing" and "Layout", choose wisely.
    For header and footers yes, you will have to:
    +Menu > Insert > Section break+ at the bottom of the last page of the section you wish to preserve.
    Then you can change the next section and the 2 will stay different.
    Please read the Pages09_UserGuide.pdf, you need to know a lot more than this if your novel is ever to hit the streets.
    Peter

Maybe you are looking for

  • Problem in Stacked chart Reports

    Hi, I was trying to create a report of Stacked Chart type. I was able to create it successfully But I still face these problems. 1. When I group the data based on an attribute of type Date, The date format appears (at the bottom of Stacks) like 2009,

  • Database is not avaible

    Hello, When start the dialog instance, the message "Database is not avaible via /usr/sap/<SID>/SYS/exe/ctrun/R3trans -d -w" is displayed. Can you help us?

  • How to call a script in OWB?

    I have some scripts in .sql form. I want to call/execute these script using owb10gr2. Any pointers as to how can I call/execute these scripts in OWB ? Thanks

  • confused ADF/Struts/JSP: Data entry page question

    Scenario: If I have a master page, say department, and a detail for entering new employees for that department (say emp). Page1: Browse Page of Departments link to [create] new emp in this department Page 2: Emp Input form If I want to display inform

  • Adding/activating  tabstrip to BP role

    Hi all, we have a problem in displaying BP data set(marketing attributesPHA030)   When i go to transaction code BUSD and check whether the data set(Marketing attribute PHA030 has been maintained in BP roles like BP General(000000)role and BP role Con