469,625 Members | 1,089 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Recordset MoveLast

The asp return the number of lastrecord from MsSQL server

the returned number is 229

the last record number is 238

anything goes wrong?

anything can assist me to troubleshoot?

Thanks a lot.

Tony
Aug 14 '05 #1
3 4622
i tried to move to the last record and move up (moveprevious) one by one.

the number is 219,238,212,211,207,204,199,198,193,191,189,155

how come they are not one by one.

the number is generated by auto increment of SQL server in 1 step.

any assistance? thanks.


"tony wong" <x3*@netvigator.com> glsD:%2****************@TK2MSFTNGP14.phx .gbl...
The asp return the number of lastrecord from MsSQL server

the returned number is 229

the last record number is 238

anything goes wrong?

anything can assist me to troubleshoot?

Thanks a lot.

Tony

Aug 14 '05 #2
tony wong wrote:
i tried to move to the last record and move up (moveprevious) one by
one.
the number is 219,238,212,211,207,204,199,198,193,191,189,155

how come they are not one by one.

the number is generated by auto increment of SQL server in 1 step.

any assistance? thanks.


You failed to use an ORDER BY clause in the query used to retrieve your
recordset. The only way to guarantee the order of te records retrieved from
a relational database is to use an ORDER BY clause.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Aug 14 '05 #3
> The asp return the number of lastrecord from MsSQL server

How are you defining "lastrecord"? There is no such thing as a "last row"
unless you tell the database how you are defining "last"...

If you want the biggest or most recent then you need to say something like:

SELECT TOP 1 * FROM table ORDER BY something DESC

If you would like a more specific answer, please see
http://www.aspfaq.com/5006
Aug 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Gerry Abbott | last post: by
12 posts views Thread by Mike MacSween | last post: by
3 posts views Thread by MLH | last post: by
2 posts views Thread by Sunil Korah | last post: by
1 post views Thread by Ray Holtz | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.