How do I remove a row from the database?

Guys and Gals,
I'm using Studio Edition Version 11.1.1.3.0.
The code below will delete a row from my table, but how do I actually delete the row from the database as well?
    DCBindingContainer dcbc = (DCBindingContainer)getBindings();
    DCIteratorBinding dcib = dcbc.findIteratorBinding("TipsSelectorIterator");
    dcib.removeCurrentRow();
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    AdfFacesContext adffacesctx = AdfFacesContext.getCurrentInstance();
    adffacesctx.addPartialTarget(this.getQueryTable()); In this post, I believe Frank sums up what I should do: Remove row from af:table
>
The problem in your case is that this removes the row from the iterator but not your business service. EJB exposes explicit methods to remove an entity. A method lime removeEmployees(employee) >expsed on the EJB model must be called.
You can drag and drop the "removeEmployees" method then as a button to your page. Rename the text label to "Remove" or "Delete". In the opened dialog box, point the method argument to the >following EL #{bindings.iteratorName.currentRow.dataProvider}. Next time you press the button, the row is deleted from the iterator and the business service
Huh? So to delete the row, I need to expose a method. But where? Do I do this in the AppModuleImpl so I can expose it to the Client Interface? But then how do I access entities? And what data type is the #{bindings.iteratorName.currentRow.dataProvider}?
If anyone could point me in a general direction, it'd be great.

Frank and Shay,
Thank you both for your posts. I'm amazed there's such a great place to get help. Between the forums, ADF code corner, Not Yet Documented ADF Samples, various blogs and tutorials, it's obvious you guys really care about what you do.
On my example, that approach doesn't seem to work. I tried following it like so in one of the video tutorials by Shay: http://blogs.oracle.com/shay/2010/04/doing_two_declarative_operatio.html. Following Shay's approach, in my particular case, deletes only from the table. Perhaps it is due to my iterator / collection setup?
TipsSelector (1 to 1) -> TipsView (1 to *)-> DependentBom -(1 to * Recursive)> RecursiveBom
TipsSelector references the same View Object as TipsView, but it is set as a 1 to 1 relationship so that I can show TipsView on the page one record at a time. This is the same setup as Tuhra2's hierarchy veiwer example. TipsView / DependentBom is a classic parent / child setup. RecursiveBom is DependentBom referencing itself. Think of it as departments within departments within departments etc...
I have dragged TipsSelector's Named Criteria (All Queriable Attributes) onto my page and created an ADF Query with Table. A remove button on the table's toolbar calls the two actions, Delete (from TipsSelector's iterator) and then Commit. I have modified the code slightly from my previous post but the end result seems to be the same.
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Delete");
    operationBinding.execute();
    bindings = getBindings();
    operationBinding = bindings.getOperationBinding("Commit");
    operationBinding.execute();
    AdfFacesContext adffacesctx = AdfFacesContext.getCurrentInstance();
    adffacesctx.addPartialTarget(this.getQueryTable());Page Def file
    <action id="Commit" InstanceName="AppModuleDataControl"
            DataControl="AppModuleDataControl" RequiresUpdateModel="true"
            Action="commitTransaction"/>
    <action IterBinding="TipsSelectorIterator" id="Delete"
            InstanceName="AppModuleDataControl.TipsSelector"
            DataControl="AppModuleDataControl" RequiresUpdateModel="false"
            Action="removeCurrentRow"/>On ppr of the query table, the row is gone. However, when I press the Search button on the query again, the record reappears.
This is beyond me. Am I somehow deleting from the query results but not the database?

Similar Messages

  • How to remove only one row from the database using labview6.1

    using labview 6.1 I create a table with various rows and columns and store bulk of data's in them.,, what procedure should I follow to remove only one paticular row from the database? Help me out with an example please,,
    Thanking you in advance!

    Hi,
    If you have the database toolkit you can delete a row using just a SQL Query to "DB Tools Execute Query.VI"
    Example:
    DELETE FROM Table name Where SerialNum='Value' And Date='Value' And Time='Value'
    See also attached VI
    Best Regards
    Johan
    Attachments:
    Delete_a_row_in_a_database_table.vi ‏48 KB

  • How do I remove an app from the update list that is under someone else's apple id?

    How do I remove an app from the update list that is under someone else's apple id? So this way the update always fails because it asks for someone else's password. I don't have the app on my mac, it only appears in the update list. It's just annoying, because the update keeps appearing, and the reminder keeps reminding me that I should install a new update.

    You installed a hacked app, originally from the Mac App Store. It contains the receipt for a different app, downloaded using an account that you don't control. You need to identify and remove the hacked app.
    Important: The app you need to remove is not necessarily the one named in the App Store alert. For example, the App Store may prompt you to update "Angry Birds" or "Twitter," but the hacked app may be something else entirely. Don't make any assumptions about which app you're looking for. To find it, you must carry out a systematic search with Spotlight.
    1. Triple-click anywhere in the line of text below on this page to select it:
    kMDItemAppStoreHasReceipt=1
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    2. In the Finder, press command-F to open a search window, or select
    File ▹ Find
    from the menu bar. In the search window, select
    Search: This Mac
    from the row of tokens below the toolbar. Below that is a popup menu of search criteria, initially showing Kind. From that menu, select
    Other...
    A sheet will drop down. In that sheet, select
    Raw Query
    as the criterion, then click OK or press return.
    Now there will be a text box to the right of the menu of search criteria. That's where you enter the raw search query. Click in that box and paste the text you copied earlier by pressing command-V.
    4. The search window will now show all the App Store products that are installed. Compare those search results with the list of your purchases from the App Store. To see the complete list, you may need to unhide hidden purchases. If any apps were download from the App Store using other Apple ID accounts that you control, sign in to the store under each of those ID's and check the purchases.
    At least one of the apps in the Spotlight search results is not among your purchases in the App Store. Move each such item to the Trash, after quitting it if it's running. You may be prompted for your administrator password. Empty the Trash.
    Quit and relaunch the App Store. Test.
    If you find these instructions confusing, ask for an alternative method.

  • HT5622 We have two iphones with the same Apple ID. Since I installed iOS this morning I have started receiving all my sons texts and when I send him a text it is delivered to both of us. How can I remove my phone from the joint Apple ID and remove myself

    My son and I both have iphones with the same Apple ID. Since I installed iOS this morning I have started receiving all my sons texts and when I send him a text it is delivered to both of us. How can I remove my phone from the joint Apple ID and remove myself from finding out what he is up to during Freshers week!

    You have to use a different Apple ID for your son.
    Read this note:
    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family
    still valid for ios 7

  • How do I remove an app from the menubar

    I deleted an app form my lanchpad when it was requesting a password as resident on the menubar and when I try to quit it at the menubar it does not close.  How do I remove this app from the menubar?

    Command-click it and drag it out. If that doesn't work, find and run an uninstaller for that application.
    (86726)

  • How can i remove favourite people from the top of my iPhone !

    how can i remove favourite people from the top of my iPhone !

    Hey donyh1,
    Thanks for the question. You can hide the recent contacts in the multitasking screen by navigating to your Contacts settings:
    Contacts settings - iPhone
    http://help.apple.com/iphone/8/#/iph96b20610
    Thanks,
    Matt M.

  • I bought my friend's used laptop. She doesn't know how to get her itunes account off the laptop, so I'm not able to do anything. How do I remove her account from the laptop?

    I bought my friends Toshiba laptop. Her itunes account is on there, hooked up to a credit card. She doesn't remember her ID. I think I had it emailed to her by typing in her email address and first and last name. Now that she probably HAS her Apple ID and Password, how do we remove her account from the laptop so I can use MY itunes?

    Delete the ENTIRE iTunes folder from her user directory.
    Frankly, you should be restoring the laptop as new, either using the restore CD provided by Toshiba or by reinstalling Windows with a Windows CD to remove ALL of her personal information.

  • How do I remove unwanted updates from the App Store?

    How do I remove unwanted updates from the App Store? So you understand better what I'm referring to:
    I have the App Store icon in the Dock. When there's an update a red number appears on said icon. Well, I went to check on the updates and it's for 4 different applications I either no longer have or use. One of them is an update for Lion OS users. I'm still on Snow Leopard, so it doesn't even apply to me.
    So there they sit... I'm not going to download the updates... so how do I get rid of them?

    Hi Andy ..
    no longer have or use
    If there are updates available for apps you have deleted, try this.
    Go to ~/Library/Caches/com.apple.appstore
    Move the Cache.db and Updates files from the com.apple.appstore folder to the Trash.
    Empty the Trash, restart your Mac.
    For any apps you still have installed but do not use, the updates will still be available from the Updates top of the App Store window and show on the red badge on the App Store icon in the Dock.
    edited by:  cs

  • How can i remove secure files from the trash? I tried click away the secure notification in info, but still i cann't remove them. Is there a buttoncombination to use?

    How can i remove secure files from the trash? I tried click away the secure notification in info, but still i cann't remove them. Is there a buttoncombination to use?

    If you are unable to empty the trash, try holding the Option key while selecting Empty Trash.
    Otherwise, some steps in the following link may help you.
    http://support.apple.com/kb/ht1526

  • How do I remove an object from the foreground of a photo eg a fence?

    How do I remove an object from the foreground of a photo eg a fence?

    What version of Photoshop?
    If CC then try here
    Learn Photoshop CC | Adobe TV

  • How do I remove a shortcut from the Home Screen of...

    How do I remove a shortcut from the Home Screen of a Nokia 700? I'm a bit clumpsy with the touch screen and I keep adding shortcuts for everyrhing. It's easy enough (too easy) to add them, but how can I remove/delete them? There doesn't seem to be any option to deleting them and it's not mentioned in the manual. 
    Solved!
    Go to Solution.

    jimmyireland wrote:
    You tap the icon hold for a second or two the x icon appears then you tap it then it goes
    Now I got it. Thanks for the help.
    I really need to practice this touch screen malarky, I'm not very good at it.

  • How do I remove a device from the list?

    I had an old Bluetooth device that I no longer own. Its name still appears in my Bluetooth list. How do I remove it? The Troubleshooting manual says:
    8. How do I remove a device from the device list?
    Using the Bluetooth preferences, select the device you want to remove to highlight it, then click the minus sign. It is recommended that you remove a device from this list while the device is connected.
    This does not work. There is no minus sign anywhere. I tried clicking the minus sign on my keyboard, but that is not it. Any suggestions?

    Its name still appears in my Bluetooth list.
    What Bluetooth list? You've completely neglected to tell us what mobile device or computer running what operating system you are referring to.
    I'll make a guess that you're using a Mac. If I'm right, the minus sign is here:

  • How do I remove a photo from the trash that I brought forward from Time Machine?

    How do I remove a photo from the trash that I brought forward using Time Machine?

    Have you tried to normal way. Highlight the photo in the Trash/Right Click: Put Back.  Or just drag it back into Events.

  • How do I remove an icon from the dock of an iMac 10.9.5.?  Dragging doesn't work although I have tried a number of different places.  I recall right clicking used to give me a remove option.

    How do I remove an icon from the dock of an iMac Maverick, 10.9.5?  I've tried dragging different places: desktop, finder list etc.  No luck.

    Drag up towards the centre of the screen & hold for a second or so. The icon will have the 'smoke cloud' appear, let go & it will be removed.
    There should also be a 'Remove from Dock' option in the popup menu. It is in the 'Options' section . ctrl+click will 'right click' if right clicking is disabled.
    If this is not possible the Dock is locked (this may happen on a 'Managed Mac' normally setup by a company or school etc). See your tech support in this case.

  • How do I remove an iBook from the "Purchased" window of the iBooks store?  I have already deleted it from the "Library" but it still shows up as a purchased book.

    How do I remove an iBook from the "Purchased" window of the iBooks store?  I have already deleted it from the "Library" but it still shows up as a purchased book.

    You can't currently delete items from your Purchased page, all you can do is hide (and unhide) them : http://support.apple.com/kb/HT4919

Maybe you are looking for