is this all of the code? is there a containing loop you arent showing us? Also, your do while is a waste of processing power (assuming that there are multiple rows being returned) do a SELECT MAX(id) FROM....
This will return the highest number in the datatable aleaviating the need for you to loop through a recordset.
Both of yoru response.writes in that loop should always produce the same value since you dont call MOVENEXT until after both statements have been wrote.
Anything else you can give us to look at?
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========