Try this: Put your SQL string into a variable: Dim SqlString SqlString = "SELECT * FROM....." Immediately after your SQL statement on line 173, do a Response.Write(SqlString) then type Response.End on the next line. This will print out your SQL statement then halt execution so that we can see what the problem is with it.