Use always sql.db.ExecuteQuery (not ExecuteQuery).