property Schedule.DataField(Property as EventKnownPropertyEnum) as Variant
Automatically updates / synchronizes the known property of the event with the associated data field and reverse.

TypeDescription
Property as EventKnownPropertyEnum A Property to be associated with a field in the record set
Variant A String expression that specifies the name of the field to be associated with the Property. A Long expression that specifies the index of the field in the recordset.
By default, the DataField(exEventStartDateTime) property is "Start" and the DataField(exEventEndDateTime) is "End". Use the DataField property to associate the exEventStartDateTime and exEventEndDateTime or exEventDuration with the fields in your data source. The DataField property must be called before calling the DataSource property. The DataSource property binds a recordset to your control. Use the DataField property to associate a property of the event with a field in the database. This way when the property is changed it is updated in the associated field. The control fires the Error event if any error occurs when handling the data source. The Syncronize method ensures that each record has associated an event, and each event has associated a record.

The following samples shows how you can bound the control to a data source:

VBA  

' Error event - Fired when an internal error occurs.
Private Sub Schedule1_Error(ByVal Error As Long,ByVal Description As String)
	With Schedule1
		Debug.Print( Description )
	End With
End Sub

With Schedule1
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3
	End With
	.BeginUpdate 
	.Calendar.Selection = #11/11/2013#
	.DataField(1) = "Start"
	.DataField(2) = "End"
	.DataField(11) = "Extra"
	.DataSource = rs
	.EndUpdate 
End With
VB6  
' Error event - Fired when an internal error occurs.
Private Sub Schedule1_Error(ByVal Error As Long,ByVal Description As String)
	With Schedule1
		Debug.Print( Description )
	End With
End Sub

With Schedule1
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3
	End With
	.BeginUpdate 
	.Calendar.Selection = #11/11/2013#
	.DataField(exEventStartDateTime) = "Start"
	.DataField(exEventEndDateTime) = "End"
	.DataField(exEventExtraLabel) = "Extra"
	.DataSource = rs
	.EndUpdate 
End With
VB.NET  
' Error event - Fired when an internal error occurs.
Private Sub Exschedule1_Error(ByVal sender As System.Object,ByVal Err As Integer,ByVal Description As String) Handles Exschedule1.Error
	With Exschedule1
		Debug.Print( Description )
	End With
End Sub

Dim rs
With Exschedule1
	rs = New ADODB.Recordset()
	With rs
		.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3)
	End With
	.BeginUpdate()
	.Calendar.Selection = #11/11/2013#
	.set_DataField(exontrol.EXSCHEDULELib.EventKnownPropertyEnum.exEventStartDateTime,"Start")
	.set_DataField(exontrol.EXSCHEDULELib.EventKnownPropertyEnum.exEventEndDateTime,"End")
	.set_DataField(exontrol.EXSCHEDULELib.EventKnownPropertyEnum.exEventExtraLabel,"Extra")
	.DataSource = rs
	.EndUpdate()
End With
VB.NET for /COM  
' Error event - Fired when an internal error occurs.
Private Sub AxSchedule1_Error(ByVal sender As System.Object, ByVal e As AxEXSCHEDULELib._IScheduleEvents_ErrorEvent) Handles AxSchedule1.Error
	With AxSchedule1
		Debug.Print( e.description )
	End With
End Sub

Dim rs
With AxSchedule1
	rs = CreateObject("ADOR.Recordset")
	With rs
		.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3)
	End With
	.BeginUpdate()
	.Calendar.Selection = #11/11/2013#
	.set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventStartDateTime,"Start")
	.set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventEndDateTime,"End")
	.set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventExtraLabel,"Extra")
	.DataSource = rs
	.EndUpdate()
End With
C++  
// Error event - Fired when an internal error occurs.
void OnErrorSchedule1(long Error,LPCTSTR Description)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXSCHEDULELib' for the library: 'ExSchedule 1.0 Control Library'
		#import <ExSchedule.dll>
		using namespace EXSCHEDULELib;
	*/
	EXSCHEDULELib::ISchedulePtr spSchedule1 = GetDlgItem(IDC_SCHEDULE1)->GetControlUnknown();
	OutputDebugStringW( L"Description" );
}

EXSCHEDULELib::ISchedulePtr spSchedule1 = GetDlgItem(IDC_SCHEDULE1)->GetControlUnknown();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.0 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Events",_bstr_t("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExSchedule\\Sample\\Access2007\\datasource.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spSchedule1->BeginUpdate();
spSchedule1->GetCalendar()->PutSelection("11/11/2013");
spSchedule1->PutDataField(EXSCHEDULELib::exEventStartDateTime,"Start");
spSchedule1->PutDataField(EXSCHEDULELib::exEventEndDateTime,"End");
spSchedule1->PutDataField(EXSCHEDULELib::exEventExtraLabel,"Extra");
spSchedule1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spSchedule1->EndUpdate();
C++ Builder  
// Error event - Fired when an internal error occurs.
void __fastcall TForm1::Schedule1Error(TObject *Sender,long Error,BSTR Description)
{
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.0 Library

	TypeLib: C:\Program Files\Common Files\System\ado\msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rs = Variant::CreateObject(L"ADOR.Recordset");
	rs->Open(TVariant("Events"),TVariant(String("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExSchedule\\Sample\\Access2007\\datasource.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
Schedule1->BeginUpdate();
Schedule1->Calendar->set_Selection(TVariant(TDateTime(2013,11,11).operator double()));
Schedule1->DataField[Exschedulelib_tlb::EventKnownPropertyEnum::exEventStartDateTime] = TVariant("Start");
Schedule1->DataField[Exschedulelib_tlb::EventKnownPropertyEnum::exEventEndDateTime] = TVariant("End");
Schedule1->DataField[Exschedulelib_tlb::EventKnownPropertyEnum::exEventExtraLabel] = TVariant("Extra");
Schedule1->DataSource = (IDispatch*)rs;
Schedule1->EndUpdate();
C#  
// Error event - Fired when an internal error occurs.
private void exschedule1_Error(object sender,int Err,string Description)
{
	System.Diagnostics.Debug.Print( Description.ToString() );
}
//this.exschedule1.Error += new exontrol.EXSCHEDULELib.exg2antt.ErrorEventHandler(this.exschedule1_Error);

// Add 'Microsoft ActiveX Data Objects 6.0 Library' reference to your project.
ADODB.Recordset rs = new ADODB.Recordset();
	rs.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExSchedule\\Sample\\Access2007\\datasource.accdb",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0);
exschedule1.BeginUpdate();
exschedule1.Calendar.Selection = Convert.ToDateTime("11/11/2013",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
exschedule1.set_DataField(exontrol.EXSCHEDULELib.EventKnownPropertyEnum.exEventStartDateTime,"Start");
exschedule1.set_DataField(exontrol.EXSCHEDULELib.EventKnownPropertyEnum.exEventEndDateTime,"End");
exschedule1.set_DataField(exontrol.EXSCHEDULELib.EventKnownPropertyEnum.exEventExtraLabel,"Extra");
exschedule1.DataSource = (rs as ADODB.Recordset);
exschedule1.EndUpdate();
JavaScript  
<SCRIPT FOR="Schedule1" EVENT="Error(Error,Description)" LANGUAGE="JScript">
	alert( Description );
</SCRIPT>

<OBJECT classid="clsid:9B09E13D-7A88-4299-9DBE-383380435377" id="Schedule1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	var rs = new ActiveXObject("ADOR.Recordset");
		rs.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExSchedule\\Sample\\Access2007\\datasource.accdb",3,3,null);
	Schedule1.BeginUpdate();
	Schedule1.Calendar.Selection = "11/11/2013";
	Schedule1.DataField(1) = "Start";
	Schedule1.DataField(2) = "End";
	Schedule1.DataField(11) = "Extra";
	Schedule1.DataSource = rs;
	Schedule1.EndUpdate();
</SCRIPT>
C# for /COM  
// Error event - Fired when an internal error occurs.
private void axSchedule1_Error(object sender, AxEXSCHEDULELib._IScheduleEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axSchedule1.Error += new AxEXSCHEDULELib._IScheduleEvents_ErrorEventHandler(this.axSchedule1_Error);

// Add 'Microsoft ActiveX Data Objects 6.0 Library' reference to your project.
ADODB.Recordset rs = new ADODB.Recordset();
	rs.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExSchedule\\Sample\\Access2007\\datasource.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0);
axSchedule1.BeginUpdate();
axSchedule1.Calendar.Selection = Convert.ToDateTime("11/11/2013",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
axSchedule1.set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventStartDateTime,"Start");
axSchedule1.set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventEndDateTime,"End");
axSchedule1.set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventExtraLabel,"Extra");
axSchedule1.DataSource = (rs as ADODB.Recordset);
axSchedule1.EndUpdate();
X++ (Dynamics Ax 2009)  
// Error event - Fired when an internal error occurs.
void onEvent_Error(int _Error,str _Description)
{
	;
	print( _Description );
}

public void init()
{
	anytype rs;
	str var_s;
	;

	super();

	// Add 'Microsoft ActiveX Data Objects 6.0 Library' reference to your project.
	rs = COM::createFromObject(new ADODB.Recordset()); rs = rs;
		var_s = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExSchedule\\Sample\\Access2007\\datasource.accdb";
		rs.Open("Events",COMVariant::createFromStr(var_s),3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exschedule1.BeginUpdate();
	exschedule1.Calendar().Selection(COMVariant::createFromDate(str2Date("11/11/2013",213)));
	exschedule1.DataField(1/*exEventStartDateTime*/,"Start");
	exschedule1.DataField(2/*exEventEndDateTime*/,"End");
	exschedule1.DataField(11/*exEventExtraLabel*/,"Extra");
	exschedule1.DataSource(rs);
	exschedule1.EndUpdate();
}
VFP  
*** Error event - Fired when an internal error occurs. ***
LPARAMETERS Error,Description
	with thisform.Schedule1
		DEBUGOUT( Description )
	endwith

with thisform.Schedule1
	rs = CreateObject("ADOR.Recordset")
	with rs
		.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3)
	endwith
	.BeginUpdate
	.Calendar.Selection = {^2013-11-11}
	.Object.DataField(1) = "Start"
	.Object.DataField(2) = "End"
	.Object.DataField(11) = "Extra"
	.DataSource = rs
	.EndUpdate
endwith
dBASE Plus  
/*
with (this.ACTIVEX1.nativeObject)
	Error = class::nativeObject_Error
endwith
*/
// Fired when an internal error occurs.
function nativeObject_Error(Error,Description)
	local oSchedule
	oSchedule = form.Activex1.nativeObject
	? Str(Description) 
return

local oSchedule,rs

oSchedule = form.Activex1.nativeObject
rs = new OleAutoClient("ADOR.Recordset")
	rs.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3)
oSchedule.BeginUpdate()
oSchedule.Calendar.Selection = "11/11/2013"
oSchedule.Template = [DataField(1) = "Start"] // oSchedule.DataField(1) = "Start"
oSchedule.Template = [DataField(2) = "End"] // oSchedule.DataField(2) = "End"
oSchedule.Template = [DataField(11) = "Extra"] // oSchedule.DataField(11) = "Extra"
oSchedule.DataSource = rs
oSchedule.EndUpdate()
XBasic (Alpha Five)  
' Fired when an internal error occurs.
function Error as v (Error as N,Description as C)
	Dim oSchedule as P
	oSchedule = topparent:CONTROL_ACTIVEX1.activex
	? Description 
end function

Dim oSchedule as P
Dim rs as P

oSchedule = topparent:CONTROL_ACTIVEX1.activex
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3)
oSchedule.BeginUpdate()
oSchedule.Calendar.Selection = {11/11/2013}
oSchedule.Template = "DataField(1) = \"Start\"" ' oSchedule.DataField(1) = "Start"
oSchedule.Template = "DataField(2) = \"End\"" ' oSchedule.DataField(2) = "End"
oSchedule.Template = "DataField(11) = \"Extra\"" ' oSchedule.DataField(11) = "Extra"
oSchedule.DataSource = rs
oSchedule.EndUpdate()
Delphi 8 (.NET only)  
// Error event - Fired when an internal error occurs.
procedure TWinForm1.AxSchedule1_Error(sender: System.Object; e: AxEXSCHEDULELib._IScheduleEvents_ErrorEvent);
begin
	with AxSchedule1 do
	begin
		OutputDebugString( e.description );
	end
end;

with AxSchedule1 do
begin
	rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset);
	with rs do
	begin
		Open('Events','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb',3,3,Nil);
	end;
	BeginUpdate();
	Calendar.Selection := '11/11/2013';
	set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventStartDateTime,'Start');
	set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventEndDateTime,'End');
	set_DataField(EXSCHEDULELib.EventKnownPropertyEnum.exEventExtraLabel,'Extra');
	DataSource := (rs as ADODB.Recordset);
	EndUpdate();
end
Delphi (standard)  
// Error event - Fired when an internal error occurs.
procedure TForm1.Schedule1Error(ASender: TObject; Error : Integer;Description : WideString);
begin
	with Schedule1 do
	begin
		OutputDebugString( Description );
	end
end;

with Schedule1 do
begin
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Events','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb',3,3,Null);
	end;
	BeginUpdate();
	Calendar.Selection := '11/11/2013';
	DataField[EXSCHEDULELib_TLB.exEventStartDateTime] := 'Start';
	DataField[EXSCHEDULELib_TLB.exEventEndDateTime] := 'End';
	DataField[EXSCHEDULELib_TLB.exEventExtraLabel] := 'Extra';
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	EndUpdate();
end
Visual Objects  
METHOD OCX_Exontrol1Error(Error,Description) CLASS MainDialog
	// Error event - Fired when an internal error occurs.
	OutputDebugString(String2Psz( AsString(Description) ))
RETURN NIL

local rs as _Recordset

// Generate Source for 'Microsoft ActiveX Data Objects 6.0 Library' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3,0)
oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Calendar:Selection := SToD("20131111")
oDCOCX_Exontrol1:[DataField,exEventStartDateTime] := "Start"
oDCOCX_Exontrol1:[DataField,exEventEndDateTime] := "End"
oDCOCX_Exontrol1:[DataField,exEventExtraLabel] := "Extra"
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:EndUpdate()
PowerBuilder  
/*begin event Error(long Error,string Description) - Fired when an internal error occurs.*/
/*
	OleObject oSchedule
	oSchedule = ole_1.Object
	MessageBox("Information",string( String(Description) ))
*/
/*end event Error*/

OleObject oSchedule,rs

oSchedule = ole_1.Object
rs = CREATE OLEObject
rs.ConnectToNewObject("ADOR.Recordset")
	rs.Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3,3)
oSchedule.BeginUpdate()
oSchedule.Calendar.Selection = 2013-11-11
oSchedule.DataField(1,"Start")
oSchedule.DataField(2,"End")
oSchedule.DataField(11,"Extra")
oSchedule.DataSource = rs
oSchedule.EndUpdate()
Visual DataFlex
// Fired when an internal error occurs.
Procedure OnComError Integer llError String llDescription
	Forward Send OnComError llError llDescription
	Showln llDescription
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant rs
	Get Comcreateobject "ADOR.Recordset" to rs
		Send ComOpen "Events" "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb" OLEadOpenStatic OLEadLockOptimistic Nothing
	Send ComBeginUpdate
	Variant voCalendar
	Get ComCalendar to voCalendar
	Handle hoCalendar
	Get Create (RefClass(cComCalendar)) to hoCalendar
	Set pvComObject of hoCalendar to voCalendar
		Set ComSelection of hoCalendar to "11/11/2013"
	Send Destroy to hoCalendar
	Set ComDataField OLEexEventStartDateTime to "Start"
	Set ComDataField OLEexEventEndDateTime to "End"
	Set ComDataField OLEexEventExtraLabel to "Extra"
	Set ComDataSource to rs
	Send ComEndUpdate
End_Procedure
Xbase++
PROCEDURE OnError(oSchedule,Error,Description)
	DevOut( Transform(Description,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oSchedule
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oSchedule := XbpActiveXControl():new( oForm:drawingArea )
	oSchedule:CLSID  := "Exontrol.Schedule.1" /*{9B09E13D-7A88-4299-9DBE-383380435377}*/
	oSchedule:create(,, {10,60},{610,370} )

		oSchedule:Error := {|Error,Description| OnError(oSchedule,Error,Description)} /*Fired when an internal error occurs.*/

		rs := CreateObject("ADOR.Recordset")
			rs:Open("Events","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExSchedule\Sample\Access2007\datasource.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oSchedule:BeginUpdate()
		oSchedule:Calendar():Selection := "11/11/2013"
		oSchedule:SetProperty("DataField",1/*exEventStartDateTime*/,"Start")
		oSchedule:SetProperty("DataField",2/*exEventEndDateTime*/,"End")
		oSchedule:SetProperty("DataField",11/*exEventExtraLabel*/,"Extra")
		oSchedule:DataSource := rs
		oSchedule:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN