KeepPartialDownload property

Specifies whether to disable or enable partial downloads when synchronizing.

Syntax
Visual Basic

Public Property KeepPartialDownload As Boolean
C#

public bool KeepPartialDownload  { get; set; }
Property value

True to enable partial downloads when synchronizing, false to disable partial downloads. The default is false.

Remarks

UltraLite.NET has the ability to restart downloads that fail because of communication errors or user aborts through the ULSyncProgressListener. UltraLite.NET processes the download as it is received. If a download is interrupted, then the partial download transaction remains in the database and can be resumed during the next synchronization.

To indicate that UltraLite.NET should save partial downloads, specify connection.SyncParms.KeepPartialDownload=true; otherwise the download is rolled back if an error occurs.

If a partial download was kept, then the output field connection.SyncResult.ULSyncResult.PartialDownloadRetained is set to true when connection.Synchronize() exits.

If PartialDownloadRetained is set, then you can resume a download. To do this, call connection.Synchronize() with connection.SyncParms.ULSyncParms.ResumePartialDownload set to true. It is recommended that you keep KeepPartialDownload set to true as well in case another communications error occurs. No upload is done if a download is skipped.

The download you receive during a resumed download is as old as when the download originally began. If you need the most up to date data, then you can do another download immediately after the special resumed download completes.

When resuming a download, many of the ULSyncParms fields are not relevant. For example, the Publications field is not used. You receive the publications that you requested on the initial download. The only fields that need to be set are ResumePartialDownload and UserName. The fields KeepPartialDownload and DisableConcurrency can be set if desired and function as normal.

If you have a partial download and it is no longer needed, then you can call ULConnection.RollbackPartialDownload() to roll back the failed download transaction. Also, if you attempt to synchronize again and do not specify ResumePartialDownload, then the partial download is rolled back before the next synchronization begins.

For more information, see the Resuming failed downloads.

See also