Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with storing value in DataTable
#1
Solved: 11 Years, 4 Months ago
OS = XP
SP = 2
QTP = 9.2.0.0
addins = ActiveX
Working with a windows application
Setting for one iteration

The following code is not writing to a DataTable

Code:
DataTable.SetCurrentRow(1)
DataTable("Active",dtLocalSheet) = "ON"
DataTable.Value("Active",dtLocalSheet) = "ON"

DataTable.Value("Active",dtGlobalSheet) = "ON"
DataTable.Value(1,dtGlobalSheet) = "ON"
=================
The following code displays the value in the column = "Restatement" so the DataTable dtLocalSheet is being seen. If I change the "Active" to "Active1", an error occurs letting me know the column name is not present.

Code:
val = DataTable("Restatement", dtLocalSheet)
msgbox ("Restatement = " & val)

I must be doing something silly and any help in writing to a DataTable would be appreciated.
Reply
#2
Solved: 11 Years, 4 Months ago
Found my mistake. Data going into the Run-Time Data Table and I was expecting the "static" table.

Now I just need to figure how to export the data from the Run-Time Data Table.

Thanks
Reply
#3
Solved: 11 Years, 4 Months ago
Hi,
Use DataTable.Export or
DataTable.ExportSheet to export the data in the runtime dataTable.
Reply
#4
Solved: 11 Years, 4 Months ago
Done.

Thanks.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Storing runtime value into datasheet priyaUFTlearner 4 3,436 04-10-2015, 10:08 PM
Last Post: priyaUFTlearner
  Datatable add and datatable import sheet wheelercha 4 33,636 06-14-2012, 04:53 PM
Last Post: Arul
  Storing to an Excel SS mv8167 1 2,269 07-05-2011, 08:31 PM
Last Post: rajpes
  Problem in Datatable Parametrization(QTP 9.0) abhishek.hegde 14 10,340 01-30-2010, 04:57 PM
Last Post: rajvanan
  storing QTP test resources(library functions,repositories) in Quality Center Pallavi 8 9,620 09-21-2009, 02:14 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)