Deployment Solution

 View Only
  • 1.  Scripting with custom tokens

    Posted Jun 29, 2009 09:50 AM
    I am trying to set a custom token as a variable in a vbscript.

    I set up the custom data source in the tools menu.

    The line is:

    strVariable = %#DB-Alias*"Select Field1 from Table where Field2 = whatever"%

    I've also tried:

    strVariable = "%#DB-Alias*"Select Field1 from Table where Field2 = whatever"%"

    DB-Alias is the name I set up in custom data sources.

    Either way it sets strVariable to null.

    I'm not sure what I'm missing, any help would be appreciatted.

    Thanks.




  • 2.  RE: Scripting with custom tokens

    Posted Jul 01, 2009 09:43 AM
    Try this format.  I use custom tokens all the time and haven't had any trouble.

    %#*"select data from dbo.myCustomTable where id='123'"%


  • 3.  RE: Scripting with custom tokens

    Posted Jul 06, 2009 12:48 PM
    Your solution unfortunately doesn't cover the two issues:
    1. A custom database
    2. Looking up a value based on a dynamic parameter.
    I am encountering the same issue when I try to look up information based on a computer's serial number.



  • 4.  RE: Scripting with custom tokens

    Posted Sep 22, 2009 02:31 AM
    Does your token work if you use it in a DOS task? You can do it direct from DS instead of a batch file.
    i.e. echo %#DB-Alias*"Select Field1 from Table where Field2 = whatever"%

    Also, you may need to put inverted commas around 'whatever', in your query.