Read a variable from a VB.NET or C#.NET executable.

  • Hello all,

    I have a project in which I need to do two things:

    The first is send a variable into a VB or C# executable program that was written by someone else (the program is version 2005). This program uses what I sent to do some stuff.

    After the program does it's thing it will set a variable in the program which I then need to read into my SSIS program and continue.

    Anyone got some direction on how I can do these two things or even a really good article on it?

    Thanks,

    Strick

  • I think we can do this by:

    Create a variable in BIRD.

    Put an Execute Processing Task, in its Editor, Set the Executable as the executable written by c#/vb. Expend the Expressions, Select the Arguments and assign the variable to it..

  • Ok thanks, I'll try that. How about reading a variable from an executable?

    Thanks,

    Strick

  • wwei (9/17/2009)


    I think we can do this by:

    Create a variable in BIRD.

    Put an Execute Processing Task, in its Editor, Set the Executable as the executable written by c#/vb. Expend the Expressions, Select the Arguments and assign the variable to it..

    BIRD? Do you mean BIDS?

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • stricknyn (9/17/2009)


    I have a project in which I need to do two things:

    The first is send a variable into a VB or C# executable program that was written by someone else (the program is version 2005). This program uses what I sent to do some stuff.

    After the program does it's thing it will set a variable in the program which I then need to read into my SSIS program and continue.

    Anyone got some direction on how I can do these two things or even a really good article on it?

    First, you cannot "send a variable into" or "read a variable from" a normal executable program unless it was written to support that. As there are at least a dozen different ways for a program to do this, you must first determine if this program supports that and if so, then what mechanism(s) does it support for that.

    wwei's reply seems to be based on the assumption that your executables support this through Environment Variables, which is one of the more common mechanisms supported by many programs, however, it is still an assumption and even then, the details are highly dependent on the executable itself.

    So, ... we need you to find out that information and then let us know.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Yes, I mean BIDS, sorry for the typo.

    My previous reply was based on the assumption that the executable needs input parameter(s).

    Whenever you guys have better ideas, please share with us. Thanks!

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

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