SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Oct 2003
    Location
    Fort Worth, Tx
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Delete Rows from data table

    I am working with an app that creates orders and logging the orders is not a problem however, when I delete the order I would like to be able to delete it from the data table orderlog tab. My question is. Is it possible to delete rows from a tab in the data table at runtime?

  2. #2
    Super Member Jonty's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    1,266
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Delete Rows from data table

    I don't think.

    Workaround can be export the datatable, delete the row using VBA and then import it back.
    Cheers
    Jonty..
    -- Here to Learn and share ---

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Delete Rows from data table

    You can empty the row by making all values blank or you can add a flag. But you can't delete a row

  4. #4
    Member
    Join Date
    Jan 2009
    Location
    Canberra
    Posts
    273
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Delete Rows from data table

    I am not sure if you can do this from QTPs API

    But one way to do achive this would be to export the data from your datatable to an excel spreadsheet using QTPs DataTable.ExportSheet

    Then using Excels API to load the sheet into Excel and delete the rows (using Excels API).
    Save the sheet (using Excels API)

    Then reimporting the sheet into your datatable using QTPs DataTable.ImportSheet

    This would be pretty ugly.

    Maybe you should rethink why you would want to do this.

  5. #5
    Junior Member
    Join Date
    Oct 2003
    Location
    Fort Worth, Tx
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Delete Rows from data table

    Thank you I appreciate your guys help.

  6. #6
    Member
    Join Date
    Jun 2008
    Posts
    220
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Delete Rows from data table

    Hi jskemper,

    I think why you are aksing this question is that you dont want to use a data which has been used earlier in a test run. The easiest way to do is to set a flag to each order in the orderlog tab. Then at end of your test run save the work sheet and remove it from data table. Call a function from qtp which would clear the flagged rows and delete them. For back up purpose you may also think them moving them to a different sheet instead of deleting them caz you may need them for audit purposes.
    I don't build Software but I make them work better, Testing is a Passion

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:23 PM.

Copyright BetaSoft Inc.