script task logging using DTS.Log

  • Hi in my script task iam using dts.log

    here in my below code if my count is 0 then i want to fail the task, so i am giving the Dts.TaskResult = (int)ScriptResults.Failure;

    but actually when i fail the task it is not logging the message.

    is there any property that i need to set or how to proceed from here any idea!

    if (Dts.Variables["GlobalMatchCount"].Value.ToString() == "0")

    {

    strbldr.AppendLine("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");

    strbldr.AppendLine("Package processing HALTED:There are no dates matching Run Date");

    strbldr.AppendLine(" Run Date : " + Dts.Variables["THERUNDATE"].Value.ToString());

    strbldr.AppendLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");

    Dts.Log(strbldr.ToString(),999,null);

    Dts.TaskResult = (int)ScriptResults.Failure;

    }

  • Have you set the script component logging on?

    I think it's called ScriptTaskLogEntry

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply