Forum Discussion
mugheessiddiqui
12 years agoContributor
Hi Megha
you can handle the above problem simply looking for empty or null value in one of the mandatory column, Once found empty or null break the loop and don't wait for Driver.EOF. I hope this will solve your problem
var mandatoryField;
while (! Driver.EOF())
{
mandatoryField = aqConvert.VarToStr(Driver.Value(0)); //assuming first column is mandatory.
if (mandatoryField== null || mandatoryField== "")
{
break;
}
// Rest of the code here.
Driver.Next();
}
Regards
Mughees Siddiqui
you can handle the above problem simply looking for empty or null value in one of the mandatory column, Once found empty or null break the loop and don't wait for Driver.EOF. I hope this will solve your problem
var mandatoryField;
while (! Driver.EOF())
{
mandatoryField = aqConvert.VarToStr(Driver.Value(0)); //assuming first column is mandatory.
if (mandatoryField== null || mandatoryField== "")
{
break;
}
// Rest of the code here.
Driver.Next();
}
Regards
Mughees Siddiqui