speed optimization

Removed unneeded MoveFirst and while loop.
Look up field types once per table instead of per row.