10-01-2008, 11:31 PM
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
=================
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.
I must be doing something silly and any help in writing to a DataTable would be appreciated.
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.