AnsweredAssumed Answered

How do I reset the counter when using "Read Rows From a JDBC table"?

Question asked by MonicaCrisostomo62133879 on May 27, 2017
Latest reply on May 30, 2017 by MonicaCrisostomo62133879



In CA Dev Test, I have a double loop in my test case using "Read Rows From a JDBC table" as the Data Set.  To debug, I have limited the data to only have 2 records to loop through.  The first time the script goes through, it correctly set "Read Rows from a JDBC Table~1_RowNum" to "1", then to "2" and then moves to execute the other loop.  But then when it gets to run the steps a second time for a different set, the "Read Rows from a JDBC Table_RowNum" value is still set to 2 so I get "Step not executed. A data set has encountered the last line of data and is exiting the workflow" and the step is not executed.


I need to find a way to reset the "counter" so I can go through it multiple times.  


For a numeric counter I could reset the counter using:

//import com.itko.lisa.test.DataSet;
//import com.itko.lisa.test.DataSetManager;

//testExec.setStateValue("lisa.counter.reset", true);


But I have not been able to find a way to reset the counter for a "Read Rows from a JDBC table"


Thanks for your help,