none
Property Expressions giving problem need help.

    Question

  • Hi,

    I have a small package, it is used to exprot data present in a SQL Server table to excel sheet. In the same package i have a send mail task, so that i can send the created excel file to the user if he wants it.

         I have created this package, keeping in mind that it will be executed from an ASP.NET application.

    It worked fine when I tried executing through BIDS. but when it is executed from ASP.NET application, I am not receiving mail to the expected mailId, when i checked sysdtslog90 there entries with event as OnError on SendMail Task. Error message is as follow

    'The result of the expression "@[User::DestinationExcelFile]" on property "FileAttachments" cannot be written to the property. The expression was evaluated, but cannot be set on the property.'

     

    I have developed the package on one machine and the ASP.NET application is being developed by my friend on different machine (which has different folder structure), does this make any difference..?

    I am not moving forward since I dont know what is the reason for this. I will be very thankful for any help.

    thank you.

    Monday, February 14, 2011 7:10 AM

All replies

  • Hi,

    The problem seems to be from the value that is passed to SSIS as the filename to be attached. Can you post the ASP.NET code that sets it?

     


    Please mark as answer if this helps. Thank you.

    http://thebipalace.wordpress.com

    Monday, February 14, 2011 7:16 AM
  • Following are another 2 error messages in sysdtslog90 table.

    The result

    of the expression ""Mapping data for the system "+ @[User::SourceSystem] +" is exported to Excel file. Please find in attachments."" on property "MessageSource" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

    The result

    of the expression "@[User::MailTo]" on property "ToLine" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

    I think the Problem with the property expression that is not set on the expected property. I dont know ASP.NET and my friend is not available.

    But one thing I can say, "@[User::DestinationExcelFile]" is evaluated in the package and is set to the full path name of the excel file that is created in the same package.

     

    Monday, February 14, 2011 7:35 AM
  • Which are properties are you trying to set using the expressions?

    The result of the expression ""Mapping data for the system "+ @[User::SourceSystem] +" is exported to Excel file. Please find in attachments."" on property "MessageSource" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

    ""Mapping data for the system "+ @[User::SourceSystem] +" is exported to Excel file. Please find in attachments."

    This will not be accepted as the message source. just use the expression: @[User::SourceSystem]


    My Blog    |    Ask Me
    Monday, February 14, 2011 8:31 AM
  • Hi Sudeep,

    But it is working fine when i execute the Package from BIDS....

    The result of the expression ""Mapping data for the system "+ @[User::SourceSystem] +" is exported to Excel file. Please find in attachments."" on property "MessageSource" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

    the above message was given in sysdtslog90 table.

    I dont think there is anything wrong with the expression. Because i checked that expression by pressing "Evaluate Expression" button on the property expression window.

    Monday, February 14, 2011 1:11 PM