This is the first in a set of 3 database samples. The series will cover,
inserting, deleting, and updating a table in a database. Being the first of the
three, this one is commented the most heavily and should be read before the
other two since much of the code is similar between the three. As with all our
samples, these are placed here as a service to our readers and as a learning aid.
They are not necessarily ready for live use on your site and you should
thoroughly test them if you intend to use them on your site. This set of three
especially is placed here to show you one way to accomplish the tasks covered.
There are other methods which may give you better performance and scalability
based upon your particular situation.
Another thing to note is that in order to keep this database reasonable, the
script automatically purges old records when the database reaches about a dozen
records. If you see entries disappear, appear, or change, it is most likely due
to the fact that you've reached this limit. Please note that it is also likely
that others may be viewing either this sample or one of the other two samples
which share the same table in the database at the same time you are viewing this
one. This also will cause changes to the database resulting in entries which
you may not be expecting to see. Ah, the wonderful world of concurrent users!
This sample is running off of our SQL Server, but a copy of the database in
Access format is available for download here.