Line 171 is this:
If I do this:
Response.Write "<hr/>DEBUG SQL:<br/>" & sSQL & "<hr/>" & vbNewLine
exactly where you have done and upload the page I get the error that you see here:
That was an imaginary record that I tried to add a couple of hours ago.