I have the following loop structure:
while ($reader.Read() -eq $true) { $row = @{} for ($i = 0; $i -lt $reader.FieldCount; $i++) { if(som
EDIT: a revised, recursive (and untested!) solution so your millage may vary:
function doReader() { while ($reader.Read() -eq $true) { $row = @{} for ($i = 0; $i -lt $reader.FieldCount; $i++) { if(something...) { #continue with while doReader break; } } } } doReader #do more stuff