Delphi Conduit Library Help

Introduction

Main Index

General Info

TpfgPalmComponent

TpfgHotSyncActionDialog

TpfgPalmRemoteTable

TpfgPalmLocalTable

TpfgUserManager

TpfgPalmSyncComponent

TpfgPalmInstall

FAQ

  

Properties

AllowCreatePalmTable
LocalAttribsField
LocalCategoryField
LocalDataSet
LocalDeletedField
LocalDirtyField
LocalRecIdField
pfgPalmRemoteTable
SyncProperties [rt]

Methods

Sync
CheckObligatoryAssignments

Events

GetLocalAttribs
GetLocalCatId
GetLocalRecId
OnBeforeLocalList
OnBeforeSync
OnCompareRecord
OnErrorMessage
OnFindLocalRecordID
SetLocalAttribs
SetLocalCatId
SetLocalRecId

TpfgPalmSyncComponent

The TpfgPalmSyncComponent class was developed by Per-Eric Larsson. It provides facilities to synchronise a local table against a remote one on the Palm.

Properties

AllowCreatePalmTable: Boolean
If true, allows the synchronization component to create the table on the Palm if it doesn't exist.

LocalAttribsField: TNumericField
Specifies a field in the local table to access Palm record flags from.

LocalCategoryField: TNumericField
Specifies a field in the local table to access the Palm record category from.

LocalDataSet: TDataSet
Specifies the local TDataSet derived table to use.

LocalDeletedField: TBooleanField
Specifies a field in the local table that signifies whether the record is deleted or not.

LocalDirtyField
Specifies a field in the local table that signifies whether the record is dirty/modified.

LocalRecIdField
Specifies a field in the local table to access the Palm record "Record ID" from.

pfgPalmRemoteTable: TpfgPalmRemoteTable
Specifies the remote table component.

SyncProperties: TpfgSyncProperties [rt]
Copy the contents of the sync properties passed to the conduit's OnExecConduit into this property prior to calling Sync - or use the overriden Sync method and pass the Sync Properties directly.

Methods

function Sync: integer;
function Sync(SyncProps: TpfgSyncProperties): integer;

Performs the synchronization. The synchronization type is dependant on the contents of the TpfgSyncProperties structure [an alias for CSyncProperties], so use it to control the operation of the component.

In order to function, the component requires that you provide not only a local and remote table, but field objects to specify the local fields that will imitate the Palm record state data.

procedure CheckObligatoryAssignments
Checks all the property settings to make sure the required fields have been set - if any of them are not, it raises an exception. The Sync method calls this as soon as it starts.

Events

GetLocalAttribs
Provides an alternate to providing both a Dirty and Deleted field object - both tis event and SetLocalAttribs must be implemented if the property is left empty.

GetLocalCatId
Provides an alternative to providing a LocalCategoryField - both this event and SetLocalCatId must be implemented if the property is left empty.

GetLocalRecId
Provides an alternative to providing a LocalRecIdField - both this event and SetLocalRecId must be implemented if the property is left empty.

OnBeforeLocalList
This event is called before all the local records are listed.

OnBeforeSync
This event is called before synchronization begins.

OnCompareRecord
Overriding this method allows you to provide your own record comparison code, superceeding the default record comparitor.

OnErrorMessage
Called when an error occurs - usefull, for example, for sending errors to a log file.

OnFindLocalRecordID
An event handler for this event must be provided to move the local table cursor to the record with the specified Record ID.

SetLocalAttribs
Provides an alternate to providing both a Dirty and Deleted field object - both tis event and GetLocalAttribs must be implemented if the property is left empty.

SetLocalCatId
Provides an alternative to providing a LocalCategoryField - both this event and GetLocalCatId must be implemented if the property is left empty.

SetLocalRecId
Provides an alternative to providing a LocalRecIdField - both this event and SetLocalRecId must be implemented if the property is left empty.