11-17-2008, 03:23 AM
hi Ankur and all,
Again one basic question regarding looping through all datatable rows,
I write values 1,2,3,4 in four rows of TCNo column in the Datatable and write the code below.
My question is: In the first run the script goes through the loop 4 times then exits, then again the Variable FormulaVal takes on the value of the next row and For... next loop is executed. How is this possible ? and can you suggest a efficient way of reading the total no. of rows and then looping through for Data driven testing.
Again one basic question regarding looping through all datatable rows,
I write values 1,2,3,4 in four rows of TCNo column in the Datatable and write the code below.
Code:
Tccount = DataTable.GetSheet("Global").GetRowCount
FormulaVal=DataTable.GetSheet("Global").GetParameter("TCNo").RawValue
For Currentrow=1 to Tccount
Currentrow=Currentrow+FormulaVal-1
msgbox Currentrow
Next
My question is: In the first run the script goes through the loop 4 times then exits, then again the Variable FormulaVal takes on the value of the next row and For... next loop is executed. How is this possible ? and can you suggest a efficient way of reading the total no. of rows and then looping through for Data driven testing.