Please watch the code indenting (too many tabs) and you should combine lines 239 (declaring fc and setting its value to 0) with the fc=rs.fieldCount line. No need to have them as separate statements. Also, there's no need for the RESOLVED comment to remain. You can simply delete the TODO comment.