RemoveTaskLogRecords Method

DTS Programming

DTS Programming

RemoveTaskLogRecords Method

The RemoveTaskLogRecords method removes the task log records that satisfy the criteria of the input parameters from the database.

Applies To
PackageSQLServer Object
Syntax

object.RemoveTaskLogRecords(
    StepExecutionID,
    SequenceID
)

Part Description
object Expression that evaluates to a PackageSQLServer object
StepExecutionID A variant specifying the step execution ID for which log records are to be removed
SequenceID A long specifying the sequence number of the log record to be removed

Remarks

Task log records are not written by the task classes supplied with Microsoft® SQL Server™ 2000, but the PackageLog interface is available so that custom tasks can write them. They are written to the msdb database on the server specified by the package LogServerName property, if the package LogToSQLServer property has been set. SequenceID is a unique sequence number for each task log record. The RemoveTaskLogRecords method removes these records from the database.

Both parameters are required. To prevent a parameter from participating in the filter process, code Null for StepExecutionID and 0 for SequenceID. Coding all parameters this way will cause all task log records in the database to be removed.

Prototype (C/C++)

HRESULT RemoveTaskLogRecords(
    VARIANT StepExecutionID,
    long SequenceID );

See Also

EnumTaskLogRecords Method

LogServerName Property

LogToSQLServer Property

PackageLog Object

RemoveAllLogRecords Method

Retrieving DTS System, Package, and Log Data

SequenceID Property

StepExecutionID Property

TaskLogRecords Collection