Dynamic message boby generation in Script Task

  • i think if you are doing it this way you will need to use the datareader to loop through the recordset and populate a text variable with the rows (using string.concatenate not the & operand).

    an alternative might be to use a dataflow task to send the recordset to a flat file and then use a send mail task to send the email with the flat file as an attachment, or even just a link to the file, if the file size is over a certain threshold (you can control this using expressions in the send mail task).

    tom

    Life: it twists and turns like a twisty turny thing

  • Thanks. Is there any code sample or any article which can help me develop this? Because I am new to .Net programming. Thanks

  • this gives a basic example of how to use the datareader, plus has links to its properties

    http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.aspx

    Life: it twists and turns like a twisty turny thing

  • Thanks a lot for your help. Much appreciated.

Viewing 4 posts - 1 through 5 (of 5 total)

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