WriteTaskRecord Method

DTS Programming

DTS Programming

WriteTaskRecord Method

The WriteTaskRecord adds a record to the server log table for the current task execution, and formats it for WriteStringToLog to write it to the log file.

Applies To
PackageLog Object
Syntax

object.WriteTaskRecord ErrorCode, Description

Part Description
object Expression that evaluates to a PackageLog object reference
ErrorCode A long integer that can be an error code or other numeric information to be logged
Description A string that can be an error description or other textual information to be logged

Remarks

The WriteTaskRecord method is available to custom tasks, where the reference to the PackageLog object is a parameter of the task Execute method, which in a custom task, you must implement. It is also available in the Data Transformation Services (DTS) Microsoft® ActiveX® Script task, through the DTSPackageLog object.

Prototype (C/C++)

HRESULT WriteTaskRecord(
    long ErrorCode,
    BSTR Description );

See Also

Retrieving DTS System, Package, and Log Data

WriteStringToLog Method