How can I delete a row in datatable!

This is my code:
com.sun.jsfcl.data.DataCache.Row row =
dataTable1Model.getDataCache().get(dataTable1.getRowIndex());
row.setDeleted(true);
dataTable1Model.commit();
dataTable1Model.execute();
we use msSQLServer2000.

Another way, to do this (here's a snippet from AppModel)
http://developer.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
if your in your DataTable you have a column of
checkboxes. If you click on the checkbox and outside your
datatable, you have a delete button. Note, sel is the id of
the checkbox.
for (int rowIndex = dataTable1.getFirst();
rowIndex < (dataTable1.getFirst() + dataTable1.getRows());
rowIndex++) {
log("OnePage: check row " + rowIndex + " for deletion");
dataTable1.setRowIndex(rowIndex);
if (!dataTable1.isRowAvailable()) {
log("OnePage: no data available for row " + rowIndex);
break;
if (sel.isSelected()) {
log("OnePage: mark row " + rowIndex + " for deletion");
com.sun.jsfcl.data.DataCache.Row row = dataTable1Model.getDataCache().get(rowIndex);
row.setDeleted(true);
count++;
sel.setSelected(false);
// Perform the actual delete transaction and report results
try {
dataTable1Model.commit();
info("Total rows deleted: " + count);
} catch (Exception e) {
log("OnePage: Delete commit exception", e);
error("OnePage: Delete commit exception: " + e);
// Re-execute the query to pick up new results
try {
dataTable1Model.execute();
} catch (SQLException e) {
log("OnePage: Delete reselect exception", e);
error("OnePage: Delete reselect exception: " + e);
Refer to the AppModel for more info
Thanks
John B
JSC QA

Similar Messages

  • How can I delete a row in access using the database toolkit?

    I want to delete just one row of a access table using the database toolkit. Can it be done and if so How?

    Take a look at page A-1 of the database connetivity manual. It has information on making a sql query that will delete. You will need to use this command with the dbtools execute query function. Look in the shipping examples for an example with this function.

  • How do I delete a row in Microsoft Access from a vi using the database toolkit

    Using the database toolkit 1.01 how can I delete a row from my vi

    Bambi,
    I know you already got the answer from Jeremy in the LabVIEW Forum, but I wanted to place this link here so that other users could see the answer.
    How do I delete a row in Microsoft Access from a vi using the database toolkit
    Evan

  • How can i delete One Blank Column in my report

    Hi guru's,
    can any one tell me .........
    i'm getting one Blank column in Query output.How can i delete that Blank Column ?
    in the same way Row  Also....
    Thanking  u advancely
    Chandra

    Here is a site with some nice sample code on deleting rows / columns : [http://www.java2s.com/Code/JavaScript/HTML/ModifyingTableColumns.htm|http://www.java2s.com/Code/JavaScript/HTML/ModifyingTableColumns.htm]
    As to where to put the code, edit your web template, then put the code in there. There are script web items that you can use, but be aware that editing javascript in the script item is not too pleasant. I have found the best approach is to rather create the javascript file on my machine, then upload it to the MIME repository, then reference that in the web template.
    Here is how I have referenced the javascript file sitting in our MIME repository:
    < script src="bwmimerep:///sap/bw/mime/Customer/javascript/CustomCalculations.js" />
    I hope this helps you out.
    Cheers,
    Andrew
    Edited by: Andrew Lewis on Jul 18, 2008 9:26 AM

  • How to soft delete a row from the target table?

    Could someone help me on this requirement?
    How to implement the below logic using only ODI? I am able to implement the below logic with the "DELETE_FLAG" as "N".
    I want to make the latest record with the flag as "N" and all the previous other records with the flag as "D".
    Thanks a lot in advance.
    I have a source table "EMP".
    EMP
    EMPID FIRST_NAME
    1 A
    2 B
    First name is changed from A to C and then, C to D etc. For each data change, I would add a target row and mark the latest row as "N" and the rest as "D". The target table would contain the following data:
    Target_EMP
    EMPID FIRST_NAME DELETE_FLAG
    1 A D
    1 C D
    1 D N

    The problem is that I can't delete the row cause it demands from me to fill the mandatory field previously. It takes place when the key field is ROWID. In other cases delete is succesful.

  • How can we delete a line from the table control .

    hi all
    how can we delete a line from the table control .
    situation is.
    created table control in se51 which will display the data of a table.
    how could i select a line from the table control ?
    how could i delete the selected lines form the table.
    thanks in advance

    Change the Table Control attributes such that user can only select a single record(row).
    <u>Tip to delete a selected record</u>
    1) write a module 'Mark' in the PAI as below
    PROCESS AFTER INPUT.
    MODULE cancel AT EXIT-COMMAND.
    LOOP WITH CONTROL table_view.
    MODULE read_table_control.
    FIELD flag MODULE mark ON INPUT.
    ENDLOOP.
    MODULE user_command_0100.
    2) Module Mark is below.
    MODULE mark INPUT.
    CHECK flag = 'X'.
    x = table_view-top_line + sy-stepl - 1.
    Delete itab INDEX x.
    ENDMODULE. " mark INPUT
    Table_view is the TableControl Name.
    'flag' is of type char(1) available in the Internal table which was assigned to the select option in the table control.
    <u>award if uesful</u>
    Regards,
    Sudheer

  • Two apple I.D., one with the .me email address I want, how can I delete it so that I can use that .me address on my other account?

    I have two apple I.D., one with the .me email address I want, how can I delete it so that I can use that .me address on my other account
    Or is it possible to transfer the purchases (apps) to my new .me account so that I can re-download them in the future without having to switch accounts?

    crazyshark wrote:
    I have two apple I.D., one with the .me email address I want, how can I delete it so that I can use that .me address on my other account
    Or is it possible to transfer the purchases (apps) to my new .me account so that I can re-download them in the future without having to switch accounts?
    You can't do this, and you can't transfer purchases between accounts. There is no conflict about using one ID for iTunes, iTunes in the Cloud and iTunes Match (the ID you've been using for iTunes) and using the other ID for iCloud.

  • HT1918 how can i delete credit card from the itunes store?

    I prefer just to use gifts cards instead of my credit card but itunes wont let me delete my credit card information, and now I cant even redownload applications that i have previously purchased on my ipad. How can I delete and leave my account with no credit card info?

    Moorside01 wrote:
    I have the same issue. My son has an iPod Touch, but it seems that he has to have a credit card associated with the Live ID
    Live ID is for Microsoft.
    Are you saying you do not have the None option when you review his payment info?

  • How can I delete an iTunes account that has been deactivated?

    I deleted an old Apple ID with the help of a call to Apple Support.  However, my iphone is still trying to use the old ID.  How do I log out of the old ID and into the new?  Or, how can I delete the old ID when it has already been deactivated?  (Cannot delete with phone)

    Only iTunes Support can potentially delete an account (which would also delete any purchase history for it, so you would no longer be able to authorise that content on a computer, redownload it, and download updates to its apps) : http://www.apple.com/support/itunes/contact/
    Or you could just remove any personal info from it (e.g. payment details if you have any on it) and stop using it

  • How can I delete an iTunes account ?

    How can I delete an iTunes account ?

    Only iTunes Support can potentially delete an account (which would also delete any purchase history for it, so you would no longer be able to authorise that content on a computer, redownload it, and download updates to its apps) : http://www.apple.com/support/itunes/contact/
    Or you could just remove any personal info from it (e.g. payment details if you have any on it) and stop using it

  • How can I delete my itunes store account

    How can I delete my itunes store account

    At the moment you can't - just remove any personal info from it (e.g. credit card details) and stop using it. If you purchased any content from Apple with it (music, films, apps etc) then you will need to remember the account id and password in case you ever want authorise it so as to use it on a different computer (or the same computer if, for exampel, you upgrade the OS)

  • How can I delete an old iCloud account for which I do not remember the password?  The email address linked to that account is no longer active.

    The email linked to that account is no longer active.  How can I delete this old account and use a new one?

    Although your profile says you're running iOS 5.1.1 it sounds like you're running iOS 7 (otherwise you would not need your password to delete the old account).  Assuming that's true, and your iCloud ID has changed but you need to delete the old account in order to change to your new one, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • How can I delete my old OTN Account ?

    Hallo,
    I create a new OTN Account, because I can't change my e.Mail.
    How can I delete my old Account ?
    With kind regards
    Roanld Breuer

    You cannot delete old accounts.

  • My emails do not go - they exit outbox and go to recovered. How can I delete my Icloud account and just use gmail.

    My emails go from outbox into I cloud recovered section. I have gmail too. how can I delete my icloud account and just use gmail? Speed test on wifi good.
    Any ideas please.

    Sign out of iCloud (System Preferences>iCloud)

  • I utilise Entourage for my mails. When I tip a mail adress and write a wrong one, I change. When I will send again a mail to the same adress the wrong and good one appears both.  How can I delete the wrong one

    Question is here above but more details here under
    I use Entourage as Mail sender. I don't use the adress book.
    When I tip a wrong adress  and make the correction, the old one stays in the memory of my computer ( apple I Mac ).
    When I wish to send a new message to the same adress, the wrong one appears in the same time , and some time I don't remember wich is the good one .
    To avoid that problem, how can I delete the wrong adress for future sending of mails.

    Solution, use Apple Mail
    I can highly recommend migrating to the Address Book. You won't have the typo'ed history in your email.
    Here's the KB on how to clear the list
    http://support.microsoft.com/kb/823667

Maybe you are looking for

  • Significance of Interfaces in ABAP Objects

    Hi Guys, here I have a query - Why do we use Interfaces in ABAP Objects?, and what is the significance of Interfaces in ABAP Objects? Please clarify the above with a suitable example.

  • Control panel screen does not respond so I cannot set up new router

    The printer recognises the new router and I can select it on the touch screen. But I cannot get any further. Several screen prompts do not work on touch screen: I cannot enter new router password in set up wizard or press start before pressing WPSbut

  • ITunes import hangs

    I recently purchased a MacBook Pro and I've slowly been importing my CD collection. Most CDs have imported with no issue... except for 3 out of about 200 (so far at least). These albums hang during import... always on the last track... and always wit

  • Why does ical sync 5 hours earlier than iphone

    When events on the iphone calendar transfer to ical the dates show a 5 hour difference. the imac time zone is US Central (DST) and the iphone is has automatically set the time zone when I entered Milwaukee in the clock.

  • Safari 6 so many crashed after upgrade to Mountain Lion

    I get multiple crashes per day. I have read so much on internet about it, but I just cannot figure out what is causing it on my system. The crash report here below. I hope someone can help. iMac 24" 2009 Process:         WebProcess [63943] Path: