05-15-2008, 10:58 AM
Hi,
I have a datasheet containing 'n' number of rows...
i am trying to read the number of rows present in a datasheet and using For loop statement ... tried to get each row of data and able to perform my actions as per the requirements...
but my problem is that it is going to infinite loop after 'n' number of rows are done...
pls find the below piece of code...
so as to avoid infinite loop we can do
but the normal FOR syntax without any special checkings should work right...
can anyone tell me how to solve this with out using special checks apart from normal FOR syntax... or correct me if iam doing wrong in using FOR syntax
Thanks
Navya
I have a datasheet containing 'n' number of rows...
i am trying to read the number of rows present in a datasheet and using For loop statement ... tried to get each row of data and able to perform my actions as per the requirements...
but my problem is that it is going to infinite loop after 'n' number of rows are done...
pls find the below piece of code...
Code:
For i=1 to rowcount
DataTable.SetCurrentRow(i)
statemnts...
.
.
.
Next
so as to avoid infinite loop we can do
Code:
if i = rowcount
exit...
but the normal FOR syntax without any special checkings should work right...
can anyone tell me how to solve this with out using special checks apart from normal FOR syntax... or correct me if iam doing wrong in using FOR syntax
Thanks
Navya