|
You can store calendar information in a single database table; this table has a simple layout. As with the other data tables in this book, you ll keep the calendar information in the WebMatrix database that you created in Chapter 9.
Create the Calendar table
In Web Matrix, click the New Connection toolbar button in the Data window to connect to MSDE and the WebMatrix database.
In the Data window, open the node for your data server. Select the Tables node, and click the New Item button on the toolbar in the Data window to display the Create New Table dialog box.
In the Table Name box, type Calendar.
Create the columns listed in the following table:
Name | Data Type | Comments |
---|---|---|
CalendarID | Int | Check Required, Primary Key, and Auto- Increment. |
CalendarDateTime | DateTime | Check Required. |
Appointment | VarChar or NVarChar | Check Required. Field size 50 characters. Make the field size sufficiently large to accommodate the maximum number of characters you intend to use to describe appointments. |
The CalendarDateTime column will hold both the date and the time of your appointments. When you ve finished, the dialog box will look like this:
Click OK to save the table definition.
As you can see, there isn t much to the Calendar table. All the fun will be in creating the pages to enter and view the calendar information. Let s start with the page for entering appointments.
|