Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to append values to the existing datatable in qtp during runtime
#2
Solved: 10 Years, 9 Months ago
Hi,
Please refer to the sample code to add data to a sheet and modify your code accordingly.
Clue: Please see the usage of AddParameter and GetParameter methods
Code:
DataTable.AddSheet("TempStatusHold")
DataTable.GetSheet("TempStatusHold").AddParameter "A","A"
DataTable.GetSheet("TempStatusHold").AddParameter"B","B"
DataTable.GetSheet("TempStatusHold").AddParameter "C","C"
DataTable.GetSheet("TempStatusHold").AddParameter"D","D"
For i=0 to 16
    DataTable.SetCurrentRow(i)
    DataTable.GetSheet("TempStatusHold").GetParameter("A").Value=i
    DataTable.GetSheet("TempStatusHold").GetParameter("B").Value=i
    DataTable.GetSheet("TempStatusHold").GetParameter("C").Value=i
    DataTable.GetSheet("TempStatusHold").GetParameter("D").Value=i
Next

Regards,
Ravi
Reply


Messages In This Thread
RE: How to append values to the existing datatable in qtp during runtime - by ravi.gajul - 05-01-2013, 08:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Add new recovery scenario to existing tests Autobot 3 3,661 03-08-2017, 08:45 AM
Last Post: workrohit08
  How to change the column name of datatable runtime in UFT sagar.raythatha 0 2,430 01-16-2017, 05:54 PM
Last Post: sagar.raythatha
  How to clear the contents of datatable(Local or Global sheet) during runtime? srinibarati 3 13,024 11-27-2016, 10:10 PM
Last Post: EbbyNader
  QTP crash during runtime. vidhu 3 3,611 07-11-2013, 03:42 PM
Last Post: vinod123
  Creating or Renaming Column of DataTable at RunTime. Girish_Pai 6 25,573 11-15-2011, 11:08 AM
Last Post: ravi.gajul

Forum Jump:


Users browsing this thread: 1 Guest(s)