This is an enhanced version of the other code sample showing how to do basic linking between a calendar and a database. In this example, we add one more field (Title) to the database table, which will then be shown in the appropriate day on the calendar. Also, this sample shows several other properties available to the Calendar control.
Again, we use the SQL Server Managed Provider for this example. The Table used is called CalSchedule, and the columns/fields are
ID (identity), CalDate (DateTime), Schedule(Text), and Title(varchar/50).
If you were using the OleDb Managed Provider, you would use:
ID (autonumber), CalDate (DateTime), Schedule(Memo), and Title(text).
(Data entered online will default to ‘Test Data’ for the Title).
To see an OleDb version of this code, to work with MS Access, click here.