@ draves: your code still does not account for deleted
records, when
there is no record in the db with next sequential id from
current record
@ davella: using cftry/cfcatch around your query, and/or just
checking
for query.recordcount and incrementing the id value if no
records found
and running your select query again with new id value should
solve your
problem...
---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com