SQL and Autonumber fields

I

Ian Griffiths

Right, so I'm creating a basic ASP guest book, keeping my guest book entries
in a Microsoft Access database, and using ADO to access it. My problem is
that I am using the autonumbered ID field to split my guestbook into pages
of 10 entries. It works for the most part, but if I delete an entry, a gap
is left in the records and I end up 9 entries instead of 10 on that page.

Basically I need a better way of sorting this out - I thought of SELECTing
all the records into an array first and then working from that, but I can't
get array to be dynamic enough in VBscript. Any ideas?

Cheers,

Ian G.
 
C

Chris Hohmann

Aaron Bertrand - MVP said:

Here's a slightly OT question. When referencing articles at ASPFAQ,
should we abbreviate like you did above? On the one hand abbreviated
links reduce overall traffic on the network, on the other, they require
additional processing by your server. Inquiring minds want to know.

-Chris Hohmann
 
A

Aaron Bertrand - MVP

Here's a slightly OT question. When referencing articles at ASPFAQ,
should we abbreviate like you did above? On the one hand abbreviated
links reduce overall traffic on the network, on the other, they require
additional processing by your server. Inquiring minds want to know.

Heh, great question. :)

I'm not really concerned about network traffic (let's count; show.asp?id=
.... hmmm, that's 12 bytes * how many news servers), and certainly those
extra 12 bytes

The processing on the server isn't all that heavy; hits a custom page that
determines from cache whether the id is valid; if so, redirects. If not,
sends to default.asp.

Aside from the fact that it looks tidier, using the short format will allow
me to change page names, or even extensions, without having to keep old
legacy show.asp around permanently. Though it looks like that will be
impossible, if you so a search on google groups for www.aspfaq.com/show.asp
:)

Ideally, all the links would be the short format, but since there are way
too many of the longer format out there, I don't think it matters either
way.

A
 
R

Ray at

Aside from the fact that it looks tidier, using the short format will allow
me to change page names, or even extensions, without having to keep old
legacy show.asp around permanently. Though it looks like that will be
impossible, if you so a search on google groups for www.aspfaq.com/show.asp
:)

You could create a custom 404 page that would specifically handle request
for show.asp and then redirect accordingly. If you'd like to learn how to
make a custom 404 page, see here. http://www.aspfaq.com/show.asp?id=2162
:p

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top