Search code examples
c#loggingpathssisexpressionbuilder

Why Variable on SSIS couldn't give the value?


Hello Before this question i already ask on Stckoverflow Create Dynamic Path For SSIS Logging with SSIS log provider for Text files

I Follow the suggestions, but my Log File didn't create? why it happens ? is it Logging on SSIS text Log File Connection couldn't changed dynamically? is it only static connection?


Solution

  • i got the answer accordingh to this link : set filepath from database in SSIS variable for logging

    IDTSVariables100 varCollection = null;
    this.VariableDispenser.LockForRead("User::FilePath");
    string XlsFile;
    
    XlsFile = varCollection["User::FilePath"].Value.ToString();
    

    all i need is :

    this.VariableDispenser.LockForRead("User::FilePath");