ASP 101 - Active Server Pages 101 - Web01
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash




FAQ for the Guestbook sample:


Is there a way to reverse the order of the messages displayed? I'd like the newest ones on top, instead of the other way around.

Unfortunately this is harder then it should be... at least if you want to continue to use a text file to store your entires.

There's really no easy way to add new entries to the top of the text file. You'll need to open the existing file, read it's contents into memory, clear out the file, insert the new comment into the empty file, and then place the old comments after it. This is not really that big a deal, but it's quite a bit more complex then just appending to the end of the file and there's more chance for something to go wrong.

You could also change the order when you display the guestbook, but this is more work. It would also be harder on the server (assuming the guestbook is displayed more often then signed.

So the long and the short of it is... it can be done, but it makes everything more complex. If there's enough interest, I'll be happy to write the script... send a request.

Okay... stop sending requests... it's written... twice! Reverse Guestbook (same file format, but not as efficient version) and Reverse Guestbook (more efficient version, but new file format).

I keep getting a Server.CreateObject Failed error but it says "The operation completed successfully". What's going on?

This is most often caused by the IUSR_{machine_name} NT account not having the appropriate NTFS permissions to access the file you're trying to open. You need to let the anonymous internet user have read, write, and delete access to the guestbook data file.

Why are the entries in my guestbook being deleted every day?

This is what happens when you cut and paste code and don't read the comments :)

Const bDeleteEntries = True

' This is used to control whether or not we empty the guestbook at
' the first hit after midnight. We do it just to keep the list
' short. You'll probably want to set this to False

Was your question not answered above?

Ask a new question

Please note: This form is only for submitting questions about the sample for us to consider including in the FAQ. If we feel the question merits inclusion, we will include it along with a reply. We will not respond to your email individually.


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers