Storing the Guestbook Entries

Because we want to store the various guestbook entries made by visitors to our Web site, we'll need to store each user's guestbook entry in a database table. Each separate piece of information we need to store concerning a guestbook entry should become a column in the database table, with an appropriate column type. Let's take a moment to review what needs to be stored with each guestbook entry:

  • The user's name

  • The user's e-mail address

  • The user's message

  • The date and time the guestbook entry was made

The user's name, e-mail address, and message will be strings, so we'll want to use appropriate-length varchar column types. A DateTime column type will suffice for the date and time the guestbook entry was made.

We need ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.