Simplest way to issue a DELETE statement from ADF?

What is the simplest way to code a delete statement in an ADF application?
In my case, I have a set of rows that have become obsolete and need to be deleted. The timeout parameter that governs this is not in the database, but configured in the application. A parameterized stored procedure seems overly complicated, and using an entity based view to retrieve all rows solely for the purpose of deleting them seems inefficient. Do I have to explicitly deal with PreparedStatement, or can I have something like a read-only view object based on a delete statement and simply say executeQuery() ?
-- Sebastian

Hi,
You can write custom function in Application Module (if you have on the page table with selection) e.g.
public void executeDelete(){
Row r = getYourViewObject().getCurrentRow();
r.remove();
getDBTransaction().commit()
or
public void executeDelete(){
getYourViewObject().removeCurrentRow();
getDBTransaction().commit()
Optionally to refresh data displayed on the page, after deleting you may invoke in your methods (after commiting):
getYourViewObject().executeQuery();
I hope it helps.
Kuba

Similar Messages

  • What is the simplest  way to get a xml-file from 10g R2 -database ?

    Hi,
    I'm new in xml, there are so many tools to work with xml:
    what is the simplest way to get a xml-file from 10g R2 -database ?
    I have : 10g R2 and a xsd.file to describe the xml-structure
    thank you
    Norbert

    There is no automatic way to generate XML documents from an arbitary set of relational tables using the information contained in an XML Schema. Typically the easiest way to generate XML from relational data is to use the SQL/XML operators (XMLElement, XMLAGG, XMLAttribtues, XMLForest). There are many examples of using these operators in the forums You can validate the generated XML against the XML Schema by registering the XML Schema with XML DB and then using the XMLType.SchemaValidate() method

  • Is there any way that I can delete photos from my iPhone by using my Mac?

    Is there any way that I can delete photos from my iPhone 4s by using iPhoto on my iMac (Mid 2011) using OS X Yosemite v10.10.2?  It seems it would be much more convenient to use my iMac to delete the photos from my iPhone or iPad, but I can't figure out how to do it.  Thanks for your consideration and help! 

    User Image Capture in your applications folder - it can delete from a connected iPhone
    LN

  • Hello, I am curious if there is any way to recover a deleted voicemail from my iPhone 4 after I have deleted it from my deleted messages.

    Hello, I am curious if there is any way to recover a deleted voicemail from my iPhone 4 after I have deleted it from my deleted messages.

    No but you can go to the deleted messages just after you delete them and undelete. Once the carrier deletes it from the system you cannot get it back.

  • Is there a way to recover a deleted video from iPad mini that wasn't backed up to iCloud or iTunes?

    I have a new Ipad mini that I used to take video. It never connected to the wifi and the video was deleted by mistake. It wasn't save to ICloud and was not connected to save to ITunes. Do any of you Mac Genius know of a way to retrieve a deleted video from an IPAD? Any help would be greatly appreciated.

    Unfortunately, when something is deleted it is gone forever, if you never made a backup.

  • Any way to view and delete photos from a camera or card without importing?

    I received my iPad yesterday and I have a Camera Connection Kit. I'd like to be able to view photos from my cf card, connected via a card reader and the Connection Kit, without having to import them. I take hundreds of pics at sporting events and would like a quick way to view the files and determine which ones are "keepers," then delete the others from the card before importing to my Mac for editing and creating web galleries.
    So far I cannot find an app that "sees" the card except the native Photo app, which only allows selection for import, not zooming or deleting.
    any tips?
    thanks
    steven

    You can delete images from most (but not all) SD cards with the camera connection kit. But you have to import them to the iPad first. I don't know how long it takes to import hundreds of photos, so that may not be too quick. I doubt that Apple is going to open the kit up to developers because for whatever reason they want it restricted to photos only. So nothing else, short of a hack, is going to be able to read from or write to the CC kit's SD card.
    There are other card reader/viewers available on the market and you could use one of those. Some are quite inexpensive. But I honestly don't know if the cheap ones have delete from the card capabilities. Anyway, a Google search of "card reader viewers" will get you the list.

  • Is the way to retrieve the deleted pages from the database application

    Hi,
    I was just deleted the pages from my database application wizard. Now, i want to retrieve the deleted pages, can you help me to retrieve those pages.
    Thankyou.

    Halloween can be a scary time -- especially if you Oops your APEX application. Of course you can't travel back in time but through the miracle of flashback, you may be able to get the APEX appl. back to where it was when. I tried these approaches and was successful with them.
    *** This assumes flashback is running on the APEX schema(?). Your abiliy to go back a given number of minutes (or hours?) will depend on whether the saved values still exist in the database. ***
    A) If you modify a page and want to go back to what you had, say, about 30 minutes ago.
    1) Under the Utilities button (on that page), select History.
    2) Determine how far back in time you want to go by examining the list of editing changes displayed.
    3) Do a page export of that page (also under Utilities) and fill in “As of __ minutes ago”.
    4) If you don’t want to lose what you've got on the “damaged” page, copy it to another page number for now.
    5) Import the exported page file.
    6) Check if you got back what you wanted.
    7) If not, try an earlier (or later) time and have another go at it.
    B) If you deleted the wrong page in the application!
    1) Assuming the last thing you did was this deletion, export the entire application filling in “As of __ minutes ago”.
    2) Just to be careful, import the file to a different unused application number. Don't overwrite someone else's application.
    3) Copy the deleted page from the new application back to where you need it.
    4) Clean up by deleting the unneeded application.
    C) If, "Doh," you deleted the wrong application!!!!
    1) Are you able to retire? If no, then proceed!
    2) Create a minimal application (with a single page) with the same number as the one deleted.
    3) Export the application filling in “As of __ minutes ago” with an appropriate number of minutes.
    4) The export file should contain the code you need to restore.
    5) You can inspect it with an editor.
    Look about line 25 for" Pages: <number>".
    For specific pages look for "page_000nn".
    5) Import the file to the same appl. number. You should get everything back!
    YMMV: Your mileage may vary!
    I'll take my leave with the words of that immortal song:
    "Yes. Oops, Oops, Oopsie! Good Bye. But Oops, Oops, Oopsie. Don't Cry."
    (With apologies to Ted Fio Rito, 1900-1971.)
    Howard

  • Is there any way I can recover deleted pictures from Camera Roll and iCloud? Please please help me. All of my precious pictures are gone that I can never EVER get back. I dont have any iCloud or Camera Roll backup; and my PC can't download more software.

    Hi everyone! I'm in need of extreme help. You see, today, two months ago I went out of the country from the United States of America. I took about 1500 pictures ONLY on my iPod touch. When I returned to the United States to my home, I accidentally deleted a little more than 100 pictures. Then, thinking I could get ALL of the pictures back at once, I restored my iPod touch from an iCloud backup I had a couple of days before. Instead of getting all of my pics back, they all got erased. The pictures that I did delete were deleted from Camera Roll AND Photo Stream (iCloud). Then, I was only able to get about 500 pictures back from iCloud. So about 1000 are still gone. When i did the restore, I thought all my pictures would be there, but they weren't and I couldn't possibly figure out why; because a restore from iTunes or iCloud is supposed to restore your device to the settings of the time you backed up your device. All of my other settings were just the way they were supposed tone for the time being, all except my pictures, which contained not one picture in any folder. So EVERYTHING from Cameta Roll was gone, and only about 500 pictures survived. I kept retoring and restoring, hoping they would come back but unfortunately they didn't. Then one time a restored again, I saw all of them back!! But then, within a blink of an eye, they disappeared as soon as I tapped on one picture. Then, I knew they were still in reach, but I just had to find them. Where could those 1000 pictures go? I looked up how to recover deleted photos, but I have to install a software. My computer CANNOT possibly take anymore software on it, my PC is very sensitive and I cannot delete anything off of it. Please please help me. What can I do to get my pictures back? They are memories that I can never EVER EVER get back. Thank you so much.

    Please please help me, if you know how.

  • Is there a way to export different button states from Photoshop to Edge Reflow? (eg., normal, hover, hit)

    Is there a special naming convention I can use for layers to have the Photoshop to Edge export tool automatically recognize a button with various states?  Rather than have static images, is it possible to have normal, hit, and hover states?
    Thanks.

    No, there's not a way to do this from Photoshop.
    VIc

  • Issue with WRITE statement from Internal Table

    Hi All,
    I have written the below code in a infoset query, the syntax check is ok & when i run the query in debugging mode, i find the internal table being filled with the values & the write statement outputing the values as well.
    But the problem is when i execute the query the output does not show all the lines, instead just displays the last record . What could be the mistake?
    Is it because i have defined Y_EBELN, Y_EBELP & Y_OPENQTY as nodes in the Extras Tab of the infoset & have chosen this for display in my query? How to display the output from my internal table in my query output?
    Hope my problem is clear, await clarification.
    Vivek
    Code
      types:
        Begin of itab,
          wl_ebeln   type eket-ebeln,
          wl_ebelp   type eket-ebelp,
          wl_openqty type eket-menge,
        End of itab.
    Data: il_po type table of itab with header line.
    *Display open PO for materials
      SELECT EKETEBELN EKETEBELP EKETMENGE EKETWEMNG EKET~EINDT
           INTO (Y_EBELN, Y_EBELP, WL_MENGE, WL_WEMNG, Y_EINDT)
        FROM EKET
          INNER JOIN EKPO
             ON EKETEBELN     = EKPOEBELN
              AND EKETEBELP = EKPOEBELP
          INNER JOIN MARD
             ON EKPOMATNR     = MARDMATNR
              AND EKPOWERKS = MARDWERKS
              AND EKPOLGORT = MARDLGORT
        WHERE EKPO~MATNR = MARD-MATNR
          AND EKPO~WERKS = MARD-WERKS
          AND EKPO~LGORT = MARD-LGORT
          AND EKPO~LOEKZ = SPACE
          AND EKPO~ELIKZ = SPACE.
    *Display only still open qty per schedule line
      Y_OPENQTY = WL_MENGE - WL_WEMNG.
      il_po-wl_ebeln = Y_EBELN.
      il_po-wl_ebelp = Y_EBELP.
      il_po-wl_openqty = Y_OPENQTY.
        append il_po.
      ENDSELECT.
    ENDIF.
    Loop at il_po.
      write:/ il_po-wl_ebeln, il_po-wl_ebelp, il_po-wl_openqty.
    endloop.

    Hi Vivek,
      Try it like this.
    Data: Begin of itab,
           lifnr type lfa1-lifnr,
           name1 type lfa1-name1,
           land1 type lfa1-land1,
          End of itab,
          it_lfa1 like table of itab with header line,
          lifnr like lfa1-lifnr,
          name1 like lfa1-name1,
          land1 like lfa1-land1.
    select lifnr name1 land1 into (lifnr, name1, land1)
           from lfa1.
    it_lfa1-lifnr = lifnr.
    it_lfa1-name1 = name1.
    it_lfa1-land1 = land1.
    append it_lfa1.
    endselect.
    loop at it_lfa1.
    write:/ it_lfa1-lifnr, it_lfa1-name1, it_lfa1-land1.
    endloop.
    Note:
    In place of the above select you insert your join select statement. It is working for me.
    You have declared your internal table wrongly. In the internal table instead of TYPE use LIKE, it will work.
    Hope this will work for you.
    Thanks & Regards
    Haritha.

  • Is there a way I can recover deleted videos from my camera roll, I didn't have a chance to back them up?

    If I went in to an Apple Store would they be able to restore it for me?

    If you do not backup with iCloud - you will not be able to restore them from that backup. Do you backup your iPad at all - with iTunes or with iCloud?
    Going into iCloud.com will not restore anything from iCloud. The way that you restore from an iCloud backup is to erase the device, start all over again and reactivate and then restore from the iCloud backup when prompted.
    Bottom line is if you do not backup with iCloud, it will not matter anyway, but this explains how to restore from a backup.
    How to backup and restore from a backup
    http://support.apple.com/kb/HT1766

  • What's the simplest way to export a single frame from an animated gif as gif?

    i have an animated gif and wish to save a single frame as a non-animated gif.
    in the past i've been achieving this by deleting all the frames i don't wish to export and deleting them before exerting, this seems very clumsy though so i figure there's a more sensible solution in there somewhere, but where?

    Thanks, Bill! Actually version 9 looks a little clearer than that, as it has two bold clear white paddles to mark the edge of the work area.
    I was a little frustrated at first, because whatever I did, it still took a year and exported the entire video.
    Then:
    I caught sight of this teeny tiny box waiting for a tick from me, which said:
    Share Work area Bar Only
    We have lift-off 
    Thanks again. So much quicker than all that deleting ahnd hoping you don't accidentally say "yes" when prompted to save changes!

  • What is the simplest way to invoke an ODI scenario from a webpage?

    Hi folks
    I have a requirement where I want number of people to be able to run certain ODI scenarios when they wish.
    Now I don't wish to roll out ODI Operator to these users.
    I'd like to create a simple web page, with a few links/buttons that will run ODI scenarios.
    Now I understand I can set up a Web application server (eg Weblogic), deploy Axis2 to this and invoke scenarios as web services etc. But this is prohibitively expensive from a licensing point of view. (And open source app server is not an option).
    I do have an apache server where I can host a simple web page. Is there a way I can get this to invoke scenarios? Or some other simple way I haven't considered?
    Thanks for looking

    ODI Web Services. You can broadcast your scenarios as web services. Here are some good reading.
    http://www.rittmanmead.com/2008/02/delving-in-to-odis-web-services-support/
    http://blogs.oracle.com/dataintegration/entry/best_practices_building_data_services_with_odi-ee
    http://john-goodwin.blogspot.com/2009/04/odi-series-web-services.html
    http://john-goodwin.blogspot.com/2009/04/odi-series-web-services-part-2.html
    http://john-goodwin.blogspot.com/2009/05/odi-series-web-services-part-3.html
    http://john-goodwin.blogspot.com/2009/05/odi-series-web-services-part-4.html

  • Issue with deleting text from CSV file in Numbers

    We are converting an Exel File into a CSV File by way of Numbers, in an effort to upload contacts into my Contacts database on my MacBook Air.  The Contacts database does not like the CSV file and I am pretty sure it is because there is text in the phone number column.  So a cell may read
    "Office:  323.555.1212"
    Before I change 600+ cells by manually taking out the word "cell" or "office" from these cells, I wonder if there is a way to format the column such that the text is ommitted.  Thanks!

    Hi gergenson,
    Find and Replace in Numbers.
    Edit > Find > Show Search (command f) will bring up a search box:
    Click on Find and Replace.
    In the Find box, type Office: followed by two spaces (there are two spaces in your example).
    Leave the Replace box empty.
    Click on Replace All.
    Repeat this for Cell.
    That editing process will replace the Find text with nothing, and will leave the rest of the cell contents unchanged.
    Regards,
    Ian.

  • Simplest way to move address book info from Tiger to Leopard machine?

    I recently acquired a white MacBook that runs leopard 10.5.6.
    I've not found an easy way to move my Tiger address book info to the new machine.
    I tried copying the address book from tiger onto a dvd and subsequently a flash drive, but leopard doesn't want any part of that.
    There is likely a way to export the vcards from the tiger app., but the help menu isn't much help in that regard.
    All help appreciated.

    you can copy the folder /users/username/library/application support/address book from the old computer to the new one. then start address book and it will look like it did on the old computer. another option is to make one vcard. start AB on the tiger machine, select all your contacts and drag them to the desktop. that will make one big vcard with all the contacts. move it to the other mac and import it to AB there.

Maybe you are looking for

  • COPA and FI reconciliation report

    Hi All, We are implementing costing based COPA for Product wise profitability report and revenues will be uploaded directly to COPA through external data transfer. The revenue g/l are made on the nature of services provided by the company and not to

  • PSE 7 Folder Missing

    Organizing photos without problems then this: I have my photos in(Drive):\My Pictures\Month Name. Using Windows Vista. When I went to move photos to \July 2008 using PSE a message popped up saying the folder name already exists, would you like to mer

  • MESSAGE_TYPE_X ( 0 376) in FKK_CLEAR_AND_TRANSFER_OP

    Hi everyone! I have a big problem with the function module FKK_CLEAR_AND_TRANSFER_OP. Yes, i know, i know its not released for customers, but i need to split and transfer a part of amount to another VTREF (If someone know another way to do it, any he

  • Ad Hoc reports

    Hi All, Is BI 7.0 a better version when compared to 3.5 when it comes to ad hoc reporting. Ad hoc meaning 'one-off' or for a particular purpose as opposed to referring Ad Hoc Query tool in SAP. If so, how. Can anyone please throw some kight on this.

  • LF official support, Lenovo G780 defect

    Hello everyone.  Writing here in desperation since I don't know where to turn to. I'm angry, desperate and disappointed.  Some time in september I bought a Lenovo G780 i5-3230M laptop. After a while there were problems, mainly the fact that the scree