Script Component and Querying Database

  • I need help understand how to use the Script Component to create a connection to the database, submit a SQL, retrieve the results. Are there any good tutorials?

    I would like to use the script component basically as a lookup to incoming rows. I have to perform numerous lookup and thought this approach of using script components would allow me to do this. Also, it would allow me to perform additional steps, where I need to built up a field as a result of the lookups.

    Any help would be appreciated.

  • You can use SQLCommand or other relevant classes.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (1/15/2013)


    You can use SQLCommand or other relevant classes.

    You missed the obvious question: why use a script component to do lookups when there is already a dedicated lookup component?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Phil Parkin (1/15/2013)


    You missed the obvious question: why use a script component to do lookups when there is already a dedicated lookup component?

    To quote the OP:

    to perform additional steps, where I need to built up a field as a result of the lookups.

    But you're right, if a traditional lookup can be used, by all means, please do so.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Koen Verbeeck (1/15/2013)


    Phil Parkin (1/15/2013)


    You missed the obvious question: why use a script component to do lookups when there is already a dedicated lookup component?

    To quote the OP:

    to perform additional steps, where I need to built up a field as a result of the lookups.

    But you're right, if a traditional lookup can be used, by all means, please do so.

    Fair enough. I think we need to understand the problem/requirement better before knowing whether it's possible using lookups (and maybe derived columns) or not ...

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

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