Code reuse in script component

  • Hi All,

    I have a script component which contains a function that will be used by many script components in my package. I was just looking for some pointers on things I can do to promote code reuse. Ideally it would be nice to only have to update the function in one place and have the script components access the function.

    Thanks,

    Strick

  • Here[/url] is a nice article, though probably not applicable to your scenario. Worth a read anyway.

    Code reuse in SSIS is not as easy as it could be. To do what you are trying to do might require a custom assembly - it works, but feels like a sledgehammer when all you want is a nutcracker.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • stricknyn (8/10/2010)


    Hi All,

    I have a script component which contains a function that will be used by many script components in my package. I was just looking for some pointers on things I can do to promote code reuse. Ideally it would be nice to only have to update the function in one place and have the script components access the function.

    Thanks,

    Strick

    I would create the function in class library using .NET and access that in all activex script after creating a reference.

    [font="Arial"]BASKAR BV
    http://geekswithblogs.net/baskibv/Default.aspx
    In life, as in football, you won’t go far unless you know where the goalposts are.[/font]

  • Phil Parkin (8/10/2010)


    Here[/url] is a nice article, though probably not applicable to your scenario. Worth a read anyway.

    Code reuse in SSIS is not as easy as it could be. To do what you are trying to do might require a custom assembly - it works, but feels like a sledgehammer when all you want is a nutcracker.

    Hi Phil,

    Did you mean to add a link to the article to your post?

    Thanks,

    Strick

  • stricknyn (8/11/2010)


    Phil Parkin (8/10/2010)


    Here[/url] is a nice article, though probably not applicable to your scenario. Worth a read anyway.

    Code reuse in SSIS is not as easy as it could be. To do what you are trying to do might require a custom assembly - it works, but feels like a sledgehammer when all you want is a nutcracker.

    Hi Phil,

    Did you mean to add a link to the article to your post?

    Thanks,

    Strick

    I did include a link - try clicking on the word 'here'.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Hi Phil,

    Sorry I missed it. I'll check that out

    Thanks!

    Strick

  • stricknyn (8/10/2010)


    Hi All,

    I have a script component which contains a function that will be used by many script components in my package. I was just looking for some pointers on things I can do to promote code reuse. Ideally it would be nice to only have to update the function in one place and have the script components access the function.

    Thanks,

    Strick

    If you can use third-party solutions, check the commercial CozyRoc Script Component Plus. It is extension of the standard script component and permits code reusability.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Phil Parkin (8/10/2010)


    Here[/url] is a nice article, though probably not applicable to your scenario. Worth a read anyway.

    Code reuse in SSIS is not as easy as it could be. To do what you are trying to do might require a custom assembly - it works, but feels like a sledgehammer when all you want is a nutcracker.

    Amazing...:-D:-D:-D

    Raunak J

Viewing 8 posts - 1 through 7 (of 7 total)

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