Urgent!! How to delete a row with OrdImage (New)!!!

I got a problem when I attempt to delete a row that contains a Image in a view object:
I am using JDeveloper 3.2. And also I use BC4J for my project. I use a web bean to delete a row from a view object:
For example, the web bean contain the following method "deletePic", the part code is following:
try {
JSPApplicationRegistry jr = JSPApplicationRegistry.getInstance ();
ApplicationModule ei = jr.getAppModuleFromContexts("Testpackage_Test_TestAM", session, null);
ViewObject s = ei.findViewObject ("PicVO");
s.executeQuery ();
if (s.hasNext ())
s.next ().remove ();
ei.getTransaction().commit();
} catch (java.lang.Exception e) {
System.out.println (e.toString ());
I simply use the Row remove method to delete a row that contain a ORDImage Field. But I got the following error that is:
oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Delete": SQL Statement " DELETE FROM TESTTABLE Testtable WHERE TESTID=:1".
I check for this error only know this error ocurr when try to commit the transaction, but don't know how to solve it....
pls help me..thx.
null

Hi Akira,
I created a table using the following SQL statement:
create table timg (id number primary key, image ordsys.ordimage);
Then I inserted some records. Next, I populated the images in some rows.
Then, I created a Business Components project. At last, I created a web bean and used this web bean in a JSP page.
In the web bean, I used your code but modified the applicationId string and view name string to reflect the ones on my machine.
The JSP ran successfully. The rows were deleted from the table by the web bean. I didn't see the exception. The database I am using is 817, the JDeveloper version is 3.2.3.
thanks,
Richard

Similar Messages

  • How to delete a row in the table in servlets

    I have met a problem in deleting a row in table using servlets.
    My table looks like this:
    ID Name Type
    12 Milienium S
    15 USIA O
    My code looks like this:
    String query = "SELECT * FROM tb_Funds";
    rs = statement.executeQuery(query);
    while(rs.next()) {          
    StdID=rs.getString("FundID");
    StdName=rs.getString("Name");
    StdType=rs.getString("Type");
    out.print("<td><INPUT TYPE=TEXT NAME=
    myName VALUE=" + StdID + "></td>");
    out.print("<td>" + StdName + "</td>");
    out.print("<td>" + StdType + "</td>");
    buf.append("<td>" + "<INPUT TYPE=SUBMIT
    NAME=Delete VALUE=DELETE>" + "</td></tr>");
    There is a delete button in every row. May I know how to delete the row that I want by getting the ID from the table and delete it from the database.
                                       

    Deleting from a table is simple -> delete from tb_funds where id = <value>. Obviously replace <value> with the appropriate ID or use a bind variable (a ?) and prepared statements.
    Are you asking how to pass the id associated with the table row from the browser when the button is pressed?

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • How to Delete duplicates rows without using rowid/distinct.

    How to delete duplicates rows present in a table without using rowid or even distinct.

    How about:
    SQL> SELECT * FROM t1;
             A          B
             1          2
             2          3
             1          2
             4          4
             4          4
             4          4
    SQL> DELETE FROM t1
      2  WHERE (a, b) IN (SELECT a, b FROM t1
      3                   GROUP BY a, b
      4                   HAVING COUNT(*) > 1) and
      5        rownum = 1;
    1 row deleted.
    SQL> /
    1 row deleted.
    SQL> /
    1 row deleted.
    SQL> /
    0 rows deleted.
    SQL> SELECT * FROM t1;
             A          B
             2          3
             1          2
             4          4Although, if I was asked a similar question with all those restrictions, my first response would be along the lines of: Is this question indicative of the way I will have to work if I join this company? If so, there is no point answering because I wouldn't touch this job with a ten foot pole.

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • How to delete the row from the ADF table using popup box

    Hi,
    I have one requirement like need to delete a record from the table, but that time need to show one popup window for confirmation of the deletion. I am using Delete buttom from the vo operations. I am able to delete the row with out popup but when i used the popup that time deletion is not happening.
    Can any one help me in this.
    Regards,

    Issue was resolved.

  • How to delete all mails with one klick?

    It's annoying to delete every single mail.
    How to delete all mails with one klick, like in the paperbasket?
    Thanks

    If the emails have been previously deleted (I.e. in the trash folder), tap Edit at the top of the list. You should see a delete all button at the bottom. If the messages are in a standard folder, they need to be handled one at a time.

  • How To Delete a Row From a TableView !!!!

    Hi,
    Does any know how to delete a row from a table view model.
    I have a TableViewModel being displayed, when the user select the particular row and click delete i want that particular row to be deleted.
    Any Suggestions How.
    Thanks,
    Emmanuel.

    If u want to delete single row, then set the property of TableView - selectionMode="SINGLESELECT". Select the radio button and click on delete button. In the main program, you can get the row value like...
    public void onDeleteButtonClicked(Event event) throws PageException {
    TableView table = (TableView) this.getComponentByName ("idTableView");
    DefaultTableViewModel dmodel = myBean.beanModel;
    String pid = "", row_selected;
    // Get the first visible row
    int firstVisibleRow = table.getVisibleFirstRow();
    // Get the last visible row
    int lastVisibleRow = table.getVisibleLastRow();
    for (int i = firstVisibleRow; i <= lastVisibleRow; i++) {
    if (table.isRowSelected(i)) {
      row_selected = i;
      pid = dmodel.getValueAt(i, 1).toString();
    "i" will give you the row no, pid has the value of the row at first column.
    Hope this helps.
    Thanks,
    Praveen

  • How to delete photos taken with iPad in iOS7?

    Before iOS 7 one could delete photos taken with iPad.  Now there does not appear any DELETE button in ios7 ?
    WHAT.?

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    iPhoto for iOS (iPad): Delete photos from iPhoto
    http://support.apple.com/kb/ph3137
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
    Delete Pictures from Your iPad
    http://www.dummies.com/how-to/content/delete-pictures-from-your-ipad.html
     Cheers, Tom

  • How can I delete a photo with the new update?

    How can I delete a photo with this new update Photos?!

    Use the View menu to switch to Photos (Moments window) if you aren't already there. Click on the photo to select it. Press the Delete key. Confirm.

  • How to delete forecast entries with zero current and original qty from a particular forecast set which span across multiple forecasts

    how to delete forecast entries with zero current and original qty from a particular forecast set which span across multiple forecasts

    Hi,
    There is no way to delete those records selectively from front end.
    The best possible way is to delete the records from MRP_FORECAST_DATES tables from backend.
    Hope that helps!!
    Regards,
    Mohan Balaji
    NOTE: Please mark the post as Helpful or Answered if the update has really helped you. This would also bring the thread to logical conclusion and will be helpful for the viewers.

  • My HDD crashed and I had to reinstall my boot and programmes on a new HDD.  I managed to recover my library.itl.  How can i import it with the new version of itunes? When i try imprt playlist, it replies that it is not a validly exported file.

    My HDD crashed and I had to reinstall my boot and programmes on a new HDD.  I managed to recover my library.itl.  How can i import it with the new version of itunes? When i try imprt playlist, it replies that it is not a validly exported file.

    It should be like the very first time you synced your phone with I-Tunes. It will notice you haven't synced before and just copy everything from your phone into I-Tunes. It shouldn't delete anything from the phone, at least it never has for me. It just puts a copy of everything into I-Tunes and even if you delete an app for example from your phone and you decide you want it back later, you can just go back into I-Tunes and copy it back over. Hope this helps.

  • How to use my itunes with a new pc

    how to use my itunes with a new pc?

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    If you have an iOS device that syncs with contact & calendar data on your computer you should migrate this information too. If that isn't possible create a dummy entry of each type in your new profile and iTunes should offer to merge the existing data from the device into the computer, otherwise the danger is that it will wipe the information from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data. If you don't have any Apple devices then see HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store.
    tt2

  • The iPod is synced with another iTunes Library, how do I sync it with my new MacBook Pro without erasing contents of iPod?

    The iPod is synced with another iTunes Library, how do I sync it with my new MacBook Pro without erasing contents of iPod?

    Copy everything from your old computer, or your backup copy of your old computer, to your new one.

  • In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE!

    In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE! Thank god Pages 09 is still there.

    …and the other 98 missing features.
    Just use Pages '09, which should be in your Applications/iWork folder.
    Rate/review Pages 5 in the App Store.
    Peter

Maybe you are looking for

  • Why can't I install OS X 10.8.4 to my Macbook Air?

    I've tried repeatedly to install OS X 10.8.4 to my computer and it just won't do it. Everytime I try to install an update it starts upadting and fails and says, "unable to install any updates" and it tells me to restart my computer.

  • Adding a file as an attacment ("icon") to a PAGES document

    Hi, Can someone advise how I can attach a RTF file etc as an attachment to a pages document so that whilst viewing the Pages file, it would appear as an icon? This is similar to adding an object from a file as an icon in MS Word. Tushar

  • Optimization PDF, make compatible with

    With Acrobat Pro, there is a command(order) (as we can make File, Register(Record) for example) in programming, to make the equivalent of: optimization PDF, Make compatible with and to choose a previous version of acrobat?

  • Images open showing grid, not all the colors

    Hello: I'm having a problem opening my images.  When I select open and select an image, it just opens with the square grey & white blocks in a grid.  The only way I can get the image to fully show with color is when I go to the channels on the lower

  • Machine goes to sleep faster than Energy Saver settings

    Hi all, (I've searched for existing threads aboutthis but couldn't find any. Hope I'm not "re" posting) I use my laptop (MBP 2.4, 8gb, INtel Core i7) to play music live, so I need it to not go to sleep for at least... 30-40 minutes as I will frequent