• put your code in a try catch, and explicitly bubble up any errors that might occur;

    you'll get a better error description than you are currently receiving:

    public void Main()

    {

    [highlight="#ffff11"]try

    {[/highlight]

    // TODO: Add your code here

    --System.IO.Path.Combine

    String Filepath = System.IO.Path.Combine(Dts.Variables["User::FileLocation"].Value.ToString() , Dts.Variables["User::FileName"].Value.ToString());

    if (

    File.Exists(Filepath))

    {

    Dts.Variables["User::FileExistFlg"].Value = 1;

    }

    MessageBox.Show(Filepath);

    MessageBox.Show(Dts.Variables["User::FileExistFlg"].Value.ToString());

    Dts.TaskResult = (int)ScriptResults.Success;

    [highlight="#ffff11"]}

    catch (Exception ex)

    {

    Dts.Events.FireError(-1, "Main", ex.Message, "", 0);

    Dts.TaskResult = (int)ScriptResults.Failure;

    }[/highlight]

    }

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!