TaskLogRecords Collection

DTS Programming

DTS Programming

TaskLogRecords Collection

The TaskLogRecords collection contains TaskLogRecord objects that provide the contents of task log records from an instance of Microsoft® SQL Server™. The log record contains information about the execution of a task that has been implemented in a Data Transformation Services (DTS) package to write task log records.

Properties
EOF Property
Methods
Next Method
Remarks

Task log records are not automatically written by the task classes supplied with SQL Server 2000, but the PackageLog interface is available so that a custom task or the script of an ActiveScriptTask object can write them. They are written to the msdb database on the server specified by the package LogServerName property each time a task in a package that has been implemented to write them is executed, if the package LogToSQLServer property has been set.

Use the EnumTaskLogRecords method of the PackageSQLServer object to return the TaskLogRecords collection.

Iterate through the objects of the TaskLogRecords collection by checking the EOF property after calling the Next method. If EOF is TRUE, Next will have returned Nothing and all the elements will have been fetched. You can also use For Each ... Next in Microsoft Visual Basic®.

See Also

ActiveScriptTask Object

EnumTaskLogRecords Method

LogServerName Property

LogToSQLServer Property

PackageSQLServer Object

Retrieving DTS System, Package and Log Data

TaskLogRecord Object