Skip to content

CalendarDataProvider Object

See Also

See Also


Description

The CalendarDataProvider Object represents the data portion of the Calendar control.

For a list of all members defined in this module, see CalendarDataProvider Members.

Object Model

Object Model
Diagram
Create Event
Create Event Ex
Create Recurrence Pattern
Retrieve Day Events
Calendar Event
Get Event
Get Recurrence Pattern
Label List
Calendar Event Label
Get All Events Raw
Schedules
Calendar Schedule
Event Categories
Calendar Event Category

Remarks

The CalendarDataProvider Object stores all Events data and provides a way to retrieve and save CalendarEvent objects.

To use CalendarDataProvider, the data source must first be set using the SetDataProvider method. Then, an instance of CalendarDataProvider needs to be created using the Create method (if opening an existing data source, the Create method is not needed). After that, use the Open method to establish a connection to the data source and initialize the object.

The CalendarDataProvider object provides a number of functions to manipulate events and event-related data. The Close method must be called after working with the data source to close the connection and de-initialize the object, freeing any unused resources.

The data provider can save event information as an XML file, Binary file, Microsoft Database (mdb) file, MAPI (Outlook 2003 format), Memory, SQL Server, MySQL, and "custom". The type of file/data created depends on the type specified when the SetDataProvider method is called.

The built-in data providers are the Memory provider, MS Access database provider, and the MAPI Outlook data provider. The calendar handles all data functionality internally with the built-in data providers. The "DoXXXX" (i.e., DoCreateEvent) events are not fired when using a built-in data provider.

The Custom data providers include SQL Server, MySQL, and Custom. Custom data providers operate in an "unbound" mode. All data must be provided and retrieved to/from the calendar by the developer. All of the "DoXXXX" (i.e., DoCreateEvent) events will be fired when using a custom data provider, and the developer must implement their own functionality for each event. For example, when an event is created using the CreateEvent method, the DoCreateEvent is fired. The developer can then add special code in the DoCreateEvent to add the event to a database or some other custom data source. For all custom data providers, the ConnectionString must contain "Provider=custom".

See the ConnectionString Sample to see how to format the connection strings.

The currently used connection string is stored in the ConnectionString property.

See the SetDataProvider Sample code for more on how to create each type of data provider.

See Also

Example


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.