Storing passwords, connection strings, and other parameters in the .app file

The sample .app file illustrates how Datacap encodes the standard Datacap database connection strings (engine, admin, fingerprint, lookup, and export) before it writes them to the .app file.

About this task

The function that is described in here is available in Datacap 8.0.1 or higher.

You can use the .app file to store other action parameters as encoded strings. You can then use smart parameters to access the strings from your actions. You do not have to specify sensitive information like passwords as action parameters.

  • Instead of: ex_login("svr/exch.asmx","user@company.com","secret")
  • Use: ex_login("svr/exch.asmx","user@company.com",@APPVAR(values/adv/pwd))

You can also use the .app file to store other action parameters that might not be sensitive. Action parameters that you do not want to hardcode into your actions. For example, you might choose to store a machine-specific path as a custom value. Then, you can change it easily if you move the application to a different computer.

Procedure

To store passwords, connection strings, and other parameters in the .app file:

  1. In the Start menu, select IBM Datacap ServicesDatacap Application Manager.
  2. Click the Custom values tab and select your application from the list on the left.
  3. Click Add new value/CS name beneath the field you want to use:
    Field Description
    General string values Use this field for action parameters you do not want to hardcode in your actions. Instead of specifying a machine-specific path as an action parameter, enter the path here and reference it from your actions as described in the next section. Datacap encodes the values when it saves them to the .app file. Do not use this field for passwords as the strings are visible to anyone who is using the Datacap Application Manager. Use the Advanced values that are listed in this table.
    Data source connection string values Use this field to store data source connection strings that are not Datacap connection strings. Type or paste your connection string into this field and reference it from your actions as described in the next section.
    Datacap data source connection string values Use this field to store Datacap data source connection strings. Click the[...] to create the connection string by using Datacap supported providers and reference it from your actions as described in the next section.
    Advanced values Use this field to store passwords or other strings you do not want to reveal through the Datacap Application Manager. Values that you type here are masked. Reference the value from your actions as described in the next section.
  4. Enter the value name and the value. Advanced values are masked whereas other values are not.
  5. Close the Datacap Application Manager window.
    Attention: If you change any of the settings in the application configuration file while Datacap Studio is open, click Connection Wizard to reopen your application. Then, you can run tasks from the Datacap Studio Test tab. Reconnecting to the application forces Datacap Studio to reload the information from the application configuration (.app) file.