Uploading spreadsheet data into the database

Hi
I want to upload the spreadsheet data into the database through front end...I dont have any idea how to do upload without using the 'utilities' option..Can anyone please help me to do this?
Thanks in advance
Fazila

Hi
I refered the example sent by vikas...but i could not understand..I dont need to specify table name in runtime...my requirement is that I will have the constant table(say MD look up table)...and I will have some data under the column heading( say repid,split name)...
Now I want to import my spreadsheet data which are under the heading repid and split name through my front end application and I have the option whether to 'overwrite' the records or 'append' the new records...after clicking the necessary option..I want to import my spread sheet data into the table defined already...and my another requirement is that I want to check the duplication of data between the spreadsheet and table...If I find the duplicates, I have to omit it and store the remaing details....
Please give me some guidelines to solve this problem....
Thanks in advance
Fazila

Similar Messages

  • Refresh jTable after inserting new data into the Database

    Hey all,
    I'm using Netbeans 6.5 to create a Desktop Application which is connected to a Java DB (Derby).
    The first simple steps were all very successfull:
    Create the jTable and bind it to the Database => everything works fine. When the application starts it correctly shows all data from the database.
    The problem starts when I try to insert new data to the database.
    For that reason I've created textfields and a button "Save". When I press the button it successfully inserts the data to the database but they are not displayed in the jTable (when the application starts they are all there, they are not updated at runtime) . I've tried table.invalidate() and table.repaint() but they just don't work.
    Any help will be GREATLY appreciated. But please have in mind that most of the code is Netbeans-generated and most of it not editable.
    Many thanks in advance.
    George

    Once again you are right my friend. I jumped to conclusion way too fast, when I shouldn't. (Give me a break, I've been busting my head with this well over a week). The response I saw when I did that was that indeed a line is added to the jTable. Because I falsly set the index of the object to be added to be second to last the row appeared on the table, what I didn't see at the time was that the last one disappeared. Hmm...
    A new adventure begins...
    So after a few hours of messing around with it here are my observations:
    1) It was not an observable list. When I add the new element with employeesList.add(newEmp); , the table gets notified but a get a bunch of exceptions:
    xception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
            at java.util.ArrayList.RangeCheck(ArrayList.java:546)
            at java.util.ArrayList.get(ArrayList.java:321)
            at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
            at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
            at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:154)
            at javax.swing.JComponent.paintComponent(JComponent.java:743)
            at javax.swing.JComponent.paint(JComponent.java:1006)
            at javax.swing.JViewport.blitDoubleBuffered(JViewport.java:1602)
            at javax.swing.JViewport.windowBlitPaint(JViewport.java:1568)
            at javax.swing.JViewport.setViewPosition(JViewport.java:1098)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:818)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:807)
            at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
            at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
            at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
            at javax.swing.JScrollBar.setValue(JScrollBar.java:441)
            at javax.swing.plaf.basic.BasicScrollBarUI.scrollByUnits(BasicScrollBarUI.java:907)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved(BasicScrollPaneUI.java:778)
            at javax.swing.plaf.basic.BasicScrollPaneUI$MouseWheelHandler.mouseWheelMoved(BasicScrollPaneUI.java:449)
            at apple.laf.CUIAquaScrollPane$XYMouseWheelHandler.mouseWheelMoved(CUIAquaScrollPane.java:38)
            at java.awt.Component.processMouseWheelEvent(Component.java:5690)
            at java.awt.Component.processEvent(Component.java:5374)
            at java.awt.Container.processEvent(Container.java:2010)
            at java.awt.Component.dispatchEventImpl(Component.java:4068)
            at java.awt.Container.dispatchEventImpl(Container.java:2068)
            at java.awt.Component.dispatchMouseWheelToAncestor(Component.java:4211)
            at java.awt.Component.dispatchEventImpl(Component.java:3955)
            at java.awt.Container.dispatchEventImpl(Container.java:2068)
            at java.awt.Component.dispatchEvent(Component.java:3903)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
            at java.awt.Container.dispatchEventImpl(Container.java:2054)
            at java.awt.Window.dispatchEventImpl(Window.java:1801)
            at java.awt.Component.dispatchEvent(Component.java:3903)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
            at java.util.ArrayList.RangeCheck(ArrayList.java:546)
            at java.util.ArrayList.get(ArrayList.java:321)
            at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
            at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
            at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
    ... and a lot morewhich from my poor understanding means that the jTable succesfully notices the change but it is not able (??) to adjust to the new change. What is more interesting is that when I plainly add the element to the end of the list (without an idex that is), a blank row appears at the end of my Table. The weird thing is that I've bound the table to some text fields below it, and when I select that empty row all the data appear correctly to the text fields.
    I tried going through:
                    org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList).add(newEmp);as well as
                    help = org.jdesktop.observablecollections.ObservableCollections.observableListHelper(employeesList);
                    help.getObservableList().add(newEmp);
                    help.fireElementChanged(employeesList.lastIndexOf(newEmp));and
                    obsemployeesList = org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList);
                    obsemployeesList.add(newEmp);and I still get the same results (both the exeptions and the mysterious empty row at the end of the table
    So, I'm again in terrible need of your advice. I can't thank you enough for the effort you put into this.
    Best regards,
    George
    Edited by: tougeo on May 30, 2009 11:06 AM
    Edited by: tougeo on May 30, 2009 11:21 AM
    Edited by: tougeo on May 30, 2009 11:30 AM

  • Should be able to enter both Japanese data and English data into the database without

    Scenario 1:
    Database Char Set: UTF 8
    National CharSet :UTF8
    String Type:Varchar2
    Problem :Unable to enter more than 1/3rd of the field length specified when entering Kanji(Japanese) Data
    Scenario 2:
    Database Char Set: JA16EUC/JA16SJIS
    National CharSet :JA16EUCFixed/JA16SJISFixed
    String Type:NVarchar2
    Problem :Unable to enter/retrieve English data written into the database but works fine with Japanese
    Scenario 3:
    Database Char Set: UTF8
    National CharSet :JA16EUCFixed
    String Type:NVarchar2
    Problem :Unable to enter/retrieve English data written into the database but works fine with Japanese
    null

    You will not be able to display the process form, or edit those values from the view profile screen.
    You would need to create custom fields that are mapped from the process form to the user's profile. Then you would need to create user form update triggers from the User Defined Fields that when the user changes them, they get pushed to the target process form by adding those task names into the provisioning process definition. This would then trigger the updates to the target resource.
    -Kevin

  • Uploading Meter data into the system

    Can some one please describe the process of uploading the meter data into CC&B.
    What is the content of the flat file that i upload.can i upload a meter read XML file directly into the staging tables.....kindly explain the steps..I have not been able to upload any daat into the system using staging control and staging upload page.
    Also i found out that there are batch process MUP1 and MUP2 which need be rum in order to upload the meter data into the system from the meter read staging table.Is this correct.
    With regards to the meter upload staging table, i referred to the MR staging table : CI_MR_STAGE_UP
    there is some data available with the installation as demo data.
    For column MR_UP_STATUS_FLAG, there are values such as E, P, C...I unsersatnd there meaning.
    1) For Pending P status, i submitted the batch processes MUP1 and then MUP2, expecting that teh status might change to Complete, c.......at the same time i ran MRUP-PRG ........well i was going to write nothing happened , but i saw that after some time all teh rows with ataus P and C are not present any more..........
    2)How do i rectify the data with E status.........
    Please helpp me uploading more data to the CI_MR_STAGE_UP Meter read staging table.

    Hi,
    thanks for the reply..
    can u please tell me what is the content of the flat file that i upload.can i upload a meter read XML file directly into the staging tables.....kindly explain the steps..I have not been able to upload any daat into the system using staging control and staging upload page.
    if u can give a flat file sample content for the meter read.
    Also is it advisable to insert data into upload staging table through SQL drectly.
    And can u pls tell me the difference between XAI upload staging table and other upload staging table such as for MR, FA etc.

  • Capture Web Cam image in APEX and Upload into the Database

    Overview
    By using a flash object, you should be able to interface with a usb web cam connected to the client machine. Their are a couple of open source ones that I know about, but the one I chose to go with is by Taboca Labs and is called CamCanvas. This is released under the MIT license, and it is at version 0.2, so not very mature - but in saying that it seems to do the trick. The next part is to upload a snapshot into the database - in this particular implementation, it is achieved by taking a snapshot, and putting that data into the canvas object. This is a new HTML5 element, so I am not certain what the IE support would be like. Once you have the image into the canvas, you can then use the provided function convertToDataURL() to convert the image into a Base64 encoded string, which you can then use to convert into to a BLOB. There is however one problem with the Base64 string - APEX has a limitation of 32k for and item value, so can't be submitted by normal means, and a workaround (AJAX) has to be implemented.
    Part 1. Capturing the Image from the Flash Object into the Canvas element
    Set up the Page
    Required Files
    Download the tarball of the webcam library from: https://github.com/taboca/CamCanvas-API-/tarball/master
    Upload the necessary components to your application. (The flash swf file can be got from one of the samples in the Samples folder. In the root of the tarball, there is actually a swf file, but this seems to be a different file than of what is in the samples - so I just stick with the one from the samples)
    Page Body
    Create a HTML region, and add the following:
        <div class="container">
           <object  id="iembedflash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240">
                <param name="movie" value="#APP_IMAGES#camcanvas.swf" />
                <param name="quality" value="high" />
              <param name="allowScriptAccess" value="always" />
                <embed  allowScriptAccess="always"  id="embedflash" src="#APP_IMAGES#camcanvas.swf" quality="high" width="320" height="240"
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" mayscript="true"  />
        </object>
        </div>
    <p><a href="javascript:captureToCanvas()">Capture</a></p>
    <canvas style="border:1px solid yellow"  id="canvas" width="320" height="240"></canvas>That will create the webcam container, and an empty canvas element for the captured image to go into.
    Also, have a hidden unprotected page item to store the Base64 code into - I called mine P2_IMAGE_BASE64
    HTML Header and Body Attribute
    Add the Page HTML Body Attribute as:
    onload="init(320,240)"
    JavaScript
    Add the following in the Function and Global Variable Declarations for the page (mostly taken out of the samples provided)
    //Camera relations functions
    var gCtx = null;
    var gCanvas = null;
    var imageData = null;
    var ii=0;
    var jj=0;
    var c=0;
    function init(ww,hh){
         gCanvas = document.getElementById("canvas");
         var w = ww;
         var h = hh;
         gCanvas.style.width = w + "px";
         gCanvas.style.height = h + "px";
         gCanvas.width = w;
         gCanvas.height = h;
         gCtx = gCanvas.getContext("2d");
         gCtx.clearRect(0, 0, w, h);
         imageData = gCtx.getImageData( 0,0,320,240);
    function passLine(stringPixels) {
         //a = (intVal >> 24) & 0xff;
         var coll = stringPixels.split("-");
         for(var i=0;i<320;i++) {
              var intVal = parseInt(coll);
              r = (intVal >> 16) & 0xff;
              g = (intVal >> 8) & 0xff;
              b = (intVal ) & 0xff;
              imageData.data[c+0]=r;
              imageData.data[c+1]=g;
              imageData.data[c+2]=b;
              imageData.data[c+3]=255;
              c+=4;
         if(c>=320*240*4) {
              c=0;
              gCtx.putImageData(imageData, 0,0);
    function captureToCanvas() {
         flash = document.getElementById("embedflash");
         flash.ccCapture();
         var canvEle = document.getElementById('canvas');
         $s('P2_IMAGE_BASE64', canvEle.toDataURL());//Assumes hidden item name is P2_IMAGE_BASE64
         clob_Submit();//this is a part of part (AJAX submit value to a collection) two
    }In the footer region of the page (which is just a loading image to show whilst the data is being submitted to the collection [hidden by default]) :<img src="#IMAGE_PREFIX#processing3.gif" id="AjaxLoading"
    style="display:none;position:absolute;left:45%;top:45%;padding:10px;border:2px solid black;background:#FFF;" />If you give it a quick test, you should be able to see the webcam feed and capture it into the canvas element by clicking the capture link, in between the two elements - it might through a JS error since the clob_Submit() function does not exist yet.
    *Part 2. Upload the image into the Database*
    As mentioned in the overview, the main limitation is that APEX can't submit values larger than 32k, which I hope the APEX development team will be fixing this limitation in a future release, the workaround isn't really good from a maintainability perspective.
    In the sample applications, there is one that demonstrates saving values to the database that are over 32k, which uses an AJAX technique: see http://www.oracle.com/technetwork/developer-tools/apex/application-express/packaged-apps-090453.html#LARGE.
    *Required Files*
    From the sample application, there is a script you need to upload, and reference in your page. So you can either install the sample application I linked to, or grab the script from the demonstration I have provided - its called apex_save_large.js.
    *Create a New Page*
    Create a page to Post the large value to (I created mine as 1000), and create the following process, with the condition that Request = SAVE. (All this is in the sample application for saving large values).declare
         l_code clob := empty_clob;
    begin
         dbms_lob.createtemporary( l_code, false, dbms_lob.SESSION );
         for i in 1..wwv_flow.g_f01.count loop
              dbms_lob.writeappend(l_code,length(wwv_flow.g_f01(i)),wwv_flow.g_f01(i));
         end loop;
         apex_collection.create_or_truncate_collection(p_collection_name => wc_pkg_globals.g_base64_collection);
         apex_collection.add_member(p_collection_name => wc_pkg_globals.g_base64_collection,p_clob001 => l_code);
         htmldb_application.g_unrecoverable_error := TRUE;
    end;I also created a package for storing the collection name, which is referred to in the process, for the collection name:create or replace
    package
    wc_pkg_globals
    as
    g_base64_collection constant varchar2(40) := 'BASE64_IMAGE';
    end wc_pkg_globals;That is all that needs to be done for page 1000. You don't use this for anything else, *so go back to edit the camera page*.
    *Modify the Function and Global Variable Declarations* (to be able to submit large values.)
    The below again assumes the item that you want to submit has an item name of 'P2_IMAGE_BASE64', the condition of the process on the POST page is request = SAVE, and the post page is page 1000. This has been taken srtaight from the sample application for saving large values.//32K Limit workaround functions
    function clob_Submit(){
              $x_Show('AjaxLoading')
              $a_PostClob('P2_IMAGE_BASE64','SAVE','1000',clob_SubmitReturn);
    function clob_SubmitReturn(){
              if(p.readyState == 4){
                             $x_Hide('AjaxLoading');
                             $x('P2_IMAGE_BASE64').value = '';
              }else{return false;}
    function doSubmit(r){
    $x('P2_IMAGE_BASE64').value = ''
         flowSelectAll();
         document.wwv_flow.p_request.value = r;
         document.wwv_flow.submit();
    }Also, reference the script that the above code makes use of, in the page header<script type="text/javascript" src="#WORKSPACE_IMAGES#apex_save_large.js"></script>Assuming the script is located in workspace images, and not associated to a specific app. Other wise reference #APP_IMAGES#
    *Set up the table to store the images*CREATE TABLE "WC_SNAPSHOT"
    "WC_SNAPSHOT_ID" NUMBER NOT NULL ENABLE,
    "BINARY" BLOB,
    CONSTRAINT "WC_SNAPSHOT_PK" PRIMARY KEY ("WC_SNAPSHOT_ID")
    create sequence seq_wc_snapshot start with 1 increment by 1;
    CREATE OR REPLACE TRIGGER "BI_WC_SNAPSHOT" BEFORE
    INSERT ON WC_SNAPSHOT FOR EACH ROW BEGIN
    SELECT seq_wc_snapshot.nextval INTO :NEW.wc_snapshot_id FROM dual;
    END;
    Then finally, create a page process to save the image:declare
    v_image_input CLOB;
    v_image_output BLOB;
    v_buffer NUMBER := 64;
    v_start_index NUMBER := 1;
    v_raw_temp raw(64);
    begin
    --discard the bit of the string we dont need
    select substr(clob001, instr(clob001, ',')+1, length(clob001)) into v_image_input
    from apex_collections
    where collection_name = wc_pkg_globals.g_base64_collection;
    dbms_lob.createtemporary(v_image_output, true);
    for i in 1..ceil(dbms_lob.getlength(v_image_input)/v_buffer) loop
    v_raw_temp := utl_encode.base64_decode(utl_raw.cast_to_raw(dbms_lob.substr(v_image_input, v_buffer, v_start_index)));
    dbms_lob.writeappend(v_image_output, utl_raw.length(v_raw_temp),v_raw_temp);
    v_start_index := v_start_index + v_buffer;
    end loop;
    insert into WC_SNAPSHOT (binary) values (v_image_output); commit;
    end;Create a save button - add some sort of validation to make sure the hidden item has a value (i.e. image has been captured). Make the above conditional for request = button name so it only runs when you click Save (you probably want to disable this button until the data has been completely submitted to the collection - I haven't done this in the demonstration).
    Voila, you should have now be able to capture the image from a webcam. Take a look at the samples from the CamCanvas API for extra effects if you wanted to do something special.
    And of course, all the above assumed you want a resolution of 320 x 240 for the image.
    Disclaimer: At time of writing, this worked with a logitech something or rather webcam, and is completely untested on IE.
    Check out a demo: http://apex.oracle.com/pls/apex/f?p=trents_demos:webcam_i (my image is a bit blocky, but i think its just my webcam. I've seen others that are much more crisp using this) Also, just be sure to wait for the progress bar to dissappear before clicking Save.
    Feedback welcomed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hmm, maybe for some reason you aren't getting the base64 version of the saved image? Is the collection getting the full base64 string? Seems like its not getting any if its no data found.
    The javascript console is your friend.
    Also, in the example i used an extra page, from what one of the examples on apex packages apps had. But since then, I found this post by Carl: http://carlback.blogspot.com/2008/04/new-stuff-4-over-head-with-clob.html - I would use this technique for submitting the clob, over what I have done - as its less hacky. Just sayin.

  • WEBUTIL_PG.WRITE_DATA( ) and uploading documents into the database

    When we run our Forms application through Forms Builder, with the user account utilized by our actual users, we're able to upload a file into the database using webutil. This particular database user account is restricted to only the tables and packages it needs access to, granting the full SELECT, INSERT, UPDATE, DELETE to the tables, and then EXECUTE on the packages.
    However, when our Developers use their personal database accounts, which essentially have SELECT ANY .. EXECUTE ANY ... etc, this upload process is halted within webutil.pll when it calls the database PACKAGE procedure WEBUTIL_PG.WRITE_DATA( ). It just hangs on that step.
    When you look in OEM, during that hang the graph is showing high levels of "Network" activity. Just a solid plateau. We can't figure out why the difference between these accounts has an effect. Does someone see a pattern here that we're missing?
    Thanks,
    --=Chuck

    "Still sounds like a permissions issue to me." I know right?
    So I logged in as myself. I have DBA privileges in the database. The call to the database package hung for me as well. No error ... just a hung cursor.
    As for debugging ... the call to WEBUTIL_PG hangs, when the Forms code gets to that point in the webutil.pll. So we never even get to the database.
    Our next step, is to try to recreate the process solely in PL/SQL without webutil.pll, but the code in there is pretty extensive, and teasing out only the pieces we'll need is pretty tricky.

  • Why does not the data get saved into the Database

    Please check if there is any thing wrong with my code here. Why cant i save the data in to my database. when i used the same things in other places it works.
    guys i have copied a portion of the code here. right now i have commented few areas to not give me any errors on the whole program
    Please check why cant i save the data into the database.
    i have created a seperate class for database connection Utilities
    void saveData()
                   //Utilities ut = new Utilities();
                   //connection = ut.getConnection();
                   //ResultSet resultSet;
              // JourneyID = ut.getResults(qryJourneyID);
                   strJourneyID = txtJourneyID.getText();
                   System.out.println("++++++++++++++++++++++++"+strJourneyID);
                   strVehicleID = (String)comboVehicleID.getSelectedItem();
                   System.out.println("++++++++++++++++++++++++"+strVehicleID);
                   strDriverID = (String)comboDvrID.getSelectedItem();
                   System.out.println("++++++++++++++++++++++++"+strDriverID);
                   strStartDateTime = txtDateTime.getText();
                   System.out.println("++++++++++++++++++++++++"+strStartDateTime);
                   int a = JOptionPane.showConfirmDialog (null, "Are u sure you want to save the changes?", "WARNING!", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
                        if (a == 0)
                             if(NEW)// new is a boolean value
                                  //ADDING NEW DATA STATMENT
                                  System.out.println("INSERTING NEW ROW IN THE TABLE...");
                                  try
                                       String insert ="INSERT INTO Job VALUES (" + "'" + strJourneyID + "'"+
                                       ", '"+ strVehicleID +     "',"
                                       +"'"+ strDriverID +"',"
                                       + "'"+ strStartDateTime +"')";
                                       System.out.println("STATEMENT IS " + insert);
    //                                   InsertStmt = connection.createStatement();
    //                                   InsertStmt.executeUpdate(insert);
                                       JOptionPane.showMessageDialog(null, "You data has been successfully saved.","TIS: Operation completed", JOptionPane.INFORMATION_MESSAGE);
                                  catch (Exception e)
                                       e.printStackTrace();
                                       JOptionPane.showMessageDialog(null, "Problem encountered while adding new data");
                             else
                                  JOptionPane.showMessageDialog(null, "it is supposed to save data");
                                  /*try
                                       String ChangeRecord = "UPDATE Job SET " +
                                       "JourneyID = '" + strJourneyID+ "'"+
                                       "VehicleID = '" + strVehicleID+"',"+
                                       "DriverID = '"+strDriverID+"'," +
                                       "StartDateTime='" + strStartDateTime+ "'";//syntax error???
                                       System.out.println(""+ ChangeRecord);
                                       UpdateStmt = connection.createStatement();//just added
                                       UpdateStmt.executeUpdate(ChangeRecord);
                                       JOptionPane.showMessageDialog(null, "You data has been successfully saved.","TIS: Operation completed", JOptionPane.INFORMATION_MESSAGE);
                                  catch (Exception change_exception)
                                       change_exception.printStackTrace();
                                       JOptionPane.showMessageDialog (null, "Problem encountered while updating","TIS: Problem encountered",JOptionPane.ERROR_MESSAGE);
                        else
                             JOptionPane.showMessageDialog(null, "You chose to cancel the operation","Operation cancelled", JOptionPane.INFORMATION_MESSAGE);
                        }

    Yes you have commented all the code that update the
    database so how can it update the database.
    By the way for inserting dont use Statement use
    PrepairedStatement
    by the way next time please post codes in code tagsMan i have commented it becaues it if i dont comment it givens me errors. like cannot find variable and i dont understand how to use the code button. whereever i click the code button it displays the  at the end of the code! what to do?
    connection = ut.getConnection();
    ResultSet resultSet;
    UpdateStmt = connection.createStatement();
    UpdateStmt = connection.createStatement();
    UpdateStmt.executeUpdate(ChangeRecord);
    please check it once again
    void saveData()
                   Utilities ut = new Utilities();
                   connection = ut.getConnection();
                   ResultSet resultSet;
              // JourneyID = ut.getResults(qryJourneyID);
                   strJourneyID = txtJourneyID.getText();
                   System.out.println("++++++++++++++++++++++++"+strJourneyID);
                   strVehicleID = (String)comboVehicleID.getSelectedItem();
                   System.out.println("++++++++++++++++++++++++"+strVehicleID);
                   strDriverID = (String)comboDvrID.getSelectedItem();
                   System.out.println("++++++++++++++++++++++++"+strDriverID);
                   strStartDateTime = txtDateTime.getText();
                   System.out.println("++++++++++++++++++++++++"+strStartDateTime);
    int a = JOptionPane.showConfirmDialog (null, "Are u sure you want to save the changes?", "WARNING!", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
                        if (a == 0)
                             if(NEW)
                                  //ADDING NEW DATA STATMENT
                                  System.out.println("INSERTING NEW ROW IN THE TABLE...");
                                  try
                                       String insert ="INSERT INTO Job VALUES (" + "'" + strJourneyID + "'"+
                                       ", '"+ strVehicleID +     "',"
                                       +"'"+ strDriverID +"',"
                                       + "'"+ strStartDateTime +"')";
                                       System.out.println("STATEMENT IS " + insert);
    //                                   InsertStmt = connection.createStatement();
    //                                   InsertStmt.executeUpdate(insert);
                                       JOptionPane.showMessageDialog(null, "You data has been successfully saved.","TIS: Operation completed", JOptionPane.INFORMATION_MESSAGE);
                                  catch (Exception e)
                                       e.printStackTrace();
                                       JOptionPane.showMessageDialog(null, "Problem encountered while adding new data");
                             else
                                  JOptionPane.showMessageDialog(null, "it is supposed to save data");
                                  try
                                       String ChangeRecord = "UPDATE Job SET " +
                                       "JourneyID = '" + strJourneyID+ "'"+
                                       "VehicleID = '" + strVehicleID+"',"+
                                       "DriverID = '"+strDriverID+"'," +
                                       "StartDateTime='" + strStartDateTime+ "'";//syntax error???
                                       System.out.println(""+ ChangeRecord);
                                       UpdateStmt = connection.createStatement();//just added
                                       UpdateStmt.executeUpdate(ChangeRecord);
                                       JOptionPane.showMessageDialog(null, "You data has been successfully saved.","TIS: Operation completed", JOptionPane.INFORMATION_MESSAGE);
                                  catch (Exception change_exception)
                                       change_exception.printStackTrace();
                                       JOptionPane.showMessageDialog (null, "Problem encountered while updating","TIS: Problem encountered",JOptionPane.ERROR_MESSAGE);
                        else
                             JOptionPane.showMessageDialog(null, "You chose to cancel the operation","Operation cancelled", JOptionPane.INFORMATION_MESSAGE);
                        }

  • How to load a XML file into the database

    Hi,
    I've always only loaded data into the database by using SQL-Loader and the data format was Excel or ASCII
    Now I have to load a XML.
    How can I do?
    The company where I work has Oracle vers. 8i (don't laugh, please)
    Thanks in advance!

    Hi,
    Tough job especially if the XML data is complex. The have been some similar question in the forum:
    Using SQL Loader to load an XML File -- use 1 field's data for many records
    SQL Loader to upload XML file
    Hope they help.
    Regards,
    Sujoy

  • Mass upload of data into Custom table

    Hello all,
                I made search in SDN and could not find the best solution to my problem and hence posting .
               What is the best way for Mass upload of data into Custom database table ?
               I think LSMW would not be a viable option as it would take longer time .
               Locking of the table also needs to be taken care.
               PLease let me know if you have a alternative to this and the best way to do this .
    Comradely,
    K.Sibi

    Hi Sibi,
    See Lock objects are required when we enter the data through screen level, or multiple users should not enter the data at same time.
    Create one Lock object in SE11, It automatically creates FM.
    DEQUEUE_EYTEST2                Release lock on object EYTEST2
    ENQUEUE_EYTEST2                Request lock for object EYTEST2
    Call these FM in your program.
    EX: Refer this links
    1 http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm
    2 http://wiki.sdn.sap.com/wiki/display/Snippets/lockingandunlockingofthe+tables
    Rgds
    Aeda

  • Problems while uploading text documents into Unicode Database

    I just upgraded our database from 9iR1 to 9iR2 (9.2.0.1.0). The server
    character set is AL32UTF8. Now I'm facing a problem when
    uploading text documents into the database via a web frontend.
    I use the upload table defined for the PL/SQL Database Access Descriptor:
    create table TB_UPLOAD (
    NAME VARCHAR2(256) not null,
    MIME_TYPE VARCHAR2(128),
    DOC_SIZE NUMBER,
    DAD_CHARSET VARCHAR2(128),
    LAST_UPDATED DATE,
    CONTENT_TYPE VARCHAR2(128),
    BLOB_CONTENT BLOB);
    After uploading a text document containing the two words "hallo welt",
    the following statement returns not "hallo welt", but "68616C6C6F2077656C74":
    declare
    b_loc blob;
    v_amount integer := 100;
    v_buffer varchar2(100);
    v_offset integer := 1;
    begin
    select blob_content into b_loc from tb_upload where name like 'mydoc.txt';
    dbms_lob.read(b_loc, v_amount, v_offset, v_buffer);
    htp.prn(v_buffer);
    end;
    What is this? I studied the documentation, but didn't found a solution.
    When trying to use Oracle's built-in procedure wpg_docload.download_file,
    the content is shown the way it should be. Unfortunately, I can't use
    wpg_docload.download_file in order to copy the BLOB content to another table.
    Any hints would be appreciated!
    Thanks so much in advance!
    Roman
    E-Mail: [email protected]

    Hi Roman,
    the upload uses a BLOB (Binary Lob). Your Document is
    stored as is in the binary representation. If you
    use dbms_lob.read on a blob and your buffer is a varchar2 the binary representation is not translated!!!
    use a raw for the buffer and utl_raw.cast_to_varchar2
    to do the conversion to varchar.
    try this
    Procedure SHOW_DOC(p_name doc_test.name%TYPE)
    IS
    v_len number;
    v_mime_type tb_upload.mime_type%TYPE;
    v_offset integer := 1;
    v_Buf_size integer := 32767;
    v_buf raw(32767);
    v_blob blob;
    v_Doc_name varchar2(1000);
    BEGIN
    v_doc_name := url_Decode(p_name);
    select mime_type,doc_size,blob_content
    into v_mime_Type,v_len,v_blob
    from tb_upload
    where name = v_doc_name;
    OWA_UTIL.MIME_HEADER(v_Mime_Type);
    begin
    LOOP
    DBMS_LOB.READ(v_blob,v_buf_size,v_offset,v_buf);
    HTP.PRN(UTL_RAW.CAST_TO_VARCHAR2(v_buf));
    v_offset := v_offset + v_buf_size;
    END LOOP;
    exception
    when no_data_found then
    null;
    end;
    END;
    HTH
    detlev

  • Urgent - Uploading spreadsheet data

    Hi,
    Can you point me to a sample application which explains how to upload spreadsheet data into multiple tables?
    As an e.g.
    Table 1 - City (id, name)
    Table 2 - City_Details(city_id, details)
    city_id is a foreign key to 'id' in city table
    Sample spreadsheet rows:
    Row 1: 'Los Angeles' 'A major city in California'
    Row 2: 'Sacramento' ' Capital of California'
    Thanks,
    Vishal

    Take a look at thread Re: Loading a CSV file into a table(Vikas Plz)
    Put your own logic into the HTMLDB_TOOLS package so it inserts into two tables.
    Mike

  • How to update data in the database through ALV grid

    Hi All,
    I diplayed an ALV grid with five fields in a classical report. I have already set the fieldcat for one field as wa_fcat_edit = 'X'. I am able to edit(modify) the data in that field. But I want to update the data into the database which is modified by me in that field. Can I update the data using BDC or any other procedure?
    This is an urgent require ment for me. Please help me ASAP.
    Thanks & Regards,
    Ramesh.

    Hi
    Please go through the link.
    Link: [http://www.****************/Tutorials/ALV/Edit/demo.htm]
    regards
    ravisankar

  • While uploading data into the r/3 using call transaction or session method

    hi experts
    while uploading data into the r/3 using call transaction or session method error occured in the middle of the processing then how these methods behaves it transfers next records or not?

    hai
    Session method: The records are not added to the database until the session is processed. sy-subrc is not returned. Error logs are created for error records. Updation in database table is always Synchronous.
    Call Transaction method: The records are immediately added to the database table. sy-subrc is returned to 0 if successful. Error logs are not created and hence the errors need to be handled explicitly. Updation in database table is either Synchronous or Asynchronous.
    While to transfer the data from the through if any errors occurs until the errors are the complete the data is not transfer to the SAP system.
    the system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35).
    so the session method should not return any value.
    In call transaction method data is directly pass to the SAP system.
    So its compulsory return the value.
    Because of the call transaction is the function.
    A function should return the value mandatory
    In session method errors stroed in SYSTEM GENRATED ERROR LOG.
    IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.
    FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.
    THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.
    THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"
    AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNING.

  • How to get data into the mySQL database?

    First some background.
    I have a website that has outgrown its designed dimensions and is a huge burden to maintain. See PPBM5 Benchmark
    There is a lot of maintenance work involved, so I'm investigating a PHP/MySQL approach to easen the burden and to add functionality to the site. With the current Excel based structure and over 420 entries, it is cumbersome for me to maintain, but also for users to find what they need.
    A MySQL based dynamic structure is a lot easier and offers vastly more selection capabilities, like selecting only records that meet specific criteria.
    Data submission is done with a form, that contains most of the relevant data, but the drawack is that people submitting their data are often not technically inclined, give wrong answers due to a lack of understanding or making typo's. The test results are attached in one or two separate .txt files, but often they have not read the instructions correctly or did something wrong, so these attached .txt files can not be trusted automatically, they have to be checked before inclusion.
    These were my initial thoughts:
    1. Data collection:
    To avoid spending all our energy and time  on correcting typo's, getting missing data, correcting errors, I am  investigating the use of CPU-Z in Ghost mode to create a .txt or .html  file that contains all relevant hardware info we need and even more. It gives all the info we currently have, but adds  data like number of memory sticks, DDR timings, stock clock speed and  BCLK setting, video card info and VRAM size, etc.
    To see what I mean, run CPU-Z, go to the About tab and press the Save Report button and look at the results.
    This can all be done without user intervention in an automatic way, but  maybe I need to add an Auto-It file to the test to make it all run as  desired.
    If this works and I'm able to extract the relevant data from the created  file and can insert it into the database, we may be in business for the  next version of PPBM5.5 or PPBM6. It does require a modification to the instructions, making them a lot  easier, because there is less data to fill out.
    2. Data submission:
    The submission form can be simplified if  the CPU-Z data can be used. We have to create an automatic way to attach  the created .html file from CPU-Z to the submission form and we have to  streamline the Output.txt and Output-MPE.txt files to be more easily included in the 'form.lib.php' file. It  currently is manual labor and very time consuming.
    3. Adding to Database:
    I have to find a way to create database  records from the Gmail forms I receive. All incoming mail messages need  to be checked on relevancy and if relevant, need to be added  automatically to the database and then offered for approval before final inclusion in the database. Data included in the database  will then include submission date and time, Email address,  IP address  used, plus links to the files submitted and available on the website.
    4. Publication of the database:
    After approval of new records from step  3, all updates will be automatically applied to the database and  accessible for users. I do not yet intend to introduce a user account ,  requesting login before all functionality is accessible. Too much trouble and administration.
    Queries should be possible on things like CPU (check box), so include  17-920, i7-930, i7-950 but exclude i7-980X and i7-990X, Size of memory  (check box), Overclocked (boolean, yes, no), SSD as OS disk, and similar  options.
    The biggest problem is to keep the color grading and statistical  indicators (Top, D9, Q3, Med, Q1 and D1) intact on dynamically generated  queries. Say you make a query which results in 20 observations, this  should show the related colors and legends. Next query results in 48 observations and of course the color grading and legends  do need to reflect that. Question in my mind, does the RPI remain  constant, independent of the query or does that need to be recalculated  on the basis of the query?
    Next thing is to allow a user to select a specific observation and by  simply clicking on it be shown, in a separate window (detail page) or  accordion, all the CPU-Z related information about the hardware.
    The graphs, Top-20 and MPE Gains, need to be dynamically adjusted, based on the query used.
    5. Ideally, external links:
    In an ideal situation, one could link the  CPU-Z data to external price databases, looking up current prices for  CPU, memory, video card, disks, raid controller, etc. to get instant  BFTB charts, based on the query made. But that is the next step.
    Situation now:
    I have a MySQL database that is easily updated with the new submissions. Simply create a .CSV flie from the submitted forms and import that into the database. The bulk of the initial work is done.Lots remain to be done as you can see above, but that is for a later time.
    Question:
    I have this table, that needs to be filled with data in the submitted and attached files. Mr. X submitted his data and can be uniquely identified by his "Ref_ID". He attached one or two files in .TXT format with the relevant test data. These files are stored on the server with a concatenated name:
    "Ref_ID","-","filename"
    Say his Ref-ID is: 20110204-6cf5 and his submitted file is called: Output(99).txt then the file can be found on the server as
    20110204-6cf5-Output(99).txt
    I need to be able to open that comma delimited file, the contents may look like this: "439","1036","819","531" and insert these contents into the relevant record and fields.
    Graphically,
    is what I want to achieve.
    This being my first exposure to PHP/MySQL, you can imagine I'm not clear on how to go from here.
    Added complication is that I actually have 5 numbers to insert per record and two calculated fields, Total Score and RPI should be calculated fields. Haven't yet figured out how to handle calculated fields, maybe only in the PHP/HTML code and not in the database.
    I hope someone can help me.

    You do have a very complex looking site and may need several tables in mysql to handle all that data. If you knew to phpmysql I would suggest taking a look at this tutorial it will help get you started in understanding how to $_GET info from a database and also how to $_POST data to a database. I am no expert just learning myself and I found this very helpful. This is the link http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html
    There are also many tutorials on Youtube to help build a CMS Content Management Site I would suggest the following: -
    http://www.youtube.com/user/phpacademy
    http://www.youtube.com/user/betterphp
    http://www.youtube.com/user/flashbuilding
    And many more on my channel here
    http://www.youtube.com/user/Whisperingonthewind
    CMS's are easier to maintain, add edit and delete content.
    I have also recently bought a Book by David Powers Training from the Source very helpful.
    Anyway hope you get it sorted.

  • Page level validation to prevent duplicate data entry into the database

    Hello,
    Can anyone please help me out with this issue.
    I have a form with two items based on a table. I already have an item level validation to check for null. Now I would like to create a page level validation to check that duplicate data are not entered into the database. I would like to check the database when the user clicks on ‘Create’ button to ensure they are not inserting duplicate record. If data already exist, then show the error message and redirect them to another page. I am using apex 3.2
    Thanks

    Hi,
    Have you tried writing a PLSQL function to check this?
    I haven't tested this specifically, but something like this should work:
    1) Create a Page Level Validation
    2) Choose PLSQL for the method
    3) Choose Function Returning Boolean for the Type
    For the validation code, you could do something like this:
    DECLARE
        v_cnt number;
    BEGIN
        select count(*)
        into v_cnt
        from
        your_table
        where
        col1 = :P1_field1 AND
        col2 = :P2_field2;
        if v_cnt > 0 then return false;
        else return true;
        end if;
    END;If the query returns false, then your error message will be displayed.
    Not sure how you would go about redirecting after this page though. Maybe just allow the user to try again with another value (in case they made a mistake) or just press a 'cancel' button to finish trying to create a new record.
    Amanda.

Maybe you are looking for

  • Return Order - Excise Invoice

    Dear SD Gurus, This scenario is related to Return Order - Excise Invoice.  In return order first we will create return Order (with Ref. to Billing Document) - Return Delivery- Billing. Now I require clarification on Excise Invoice returns.  How to ca

  • Manual WSDL creation with Complex data types

    I'm trying to manually generate a WSDL, for a bpel workflow, so the wsdl constructs do not come from a Java class file, or any of the other normal ways you might generate a WSDL. I have successfully created a Definition object from the WSDLFactory, w

  • Burned DVD does not produce the same result as the Encore 2.0 preview

    Video captured directly into Adobe Premier Pro 2.0 from a Canon GL2 camera Using an HP media center PC (Model M1270N) Pentium 4 (3.00 GHz) 1.0 GB RAM ATI Radeon X300SE PCI-E graphics card 128 MB DDR video memory I purchased Adobe Creative Suite (Prod

  • Changing of labels

    Hi, I have a requirement where in i have to change the label 'Search Criteria' and 'Result List' on the Search Page. Please if anyone could help me in doing Thanks and Regards, Radhika Chuttani

  • Disconnection doesn't work sometimes

    Hi, When I click on Sign Out, I can be disconnected like not. Sometimes, I have a page which say me to close all the window of my explorer to be disconnected (next time I will print here the text, a little long)... too bad... And sometimes it works w