Skip to content

dbSetContext (dbCONNECT)

Compatible with:
  • Purpose
  • This command is used to specify to Worksoft SaaS the "database" within which the SQL queries within the current dbBlock must be executed AND the "dbCONNECT tunnel" (that is operating within your company's firewalls) that will service the execution of those queries.
  • As a security best practice, Worksoft SaaS does NOT need to know any more information (connection string data like IP addresses, host names, schema names, usernames, passwords, etc) about the databases (behind your company's applications (AUTs) and behind your firewalls) beyond the alias name(s) you give to those database(s).

    The "db.json" file that drives the dbCONNECT tunnel (operating within your company's infrastructure) is where you can specify the database connection strings and assign a 'db alias name' which then you'd use safely in Worksoft SaaS. Since db.json is on your company's network, Worksoft SaaS cannot access the db connection strings.

    The "dbCONNECT Tunnel Name" is a name you give to your dbCONNECT Tunnel when you start the Tunnel. The name you give must be unique.
  • Syntax
  • dbSetContext(dbTunnelName,dbAliasName)
  • Target
  • dbCONNECT Tunnel Name

    (This is also sometimes referred to as dbTunnelName)
  • Value
  • dbAliasName
  • Return Value
  • N/A

Example: Health Insurance Calculator

In this example, dbBlock is opened and db Context is set by passing tunnel and alias names to connect to the respective db.

Worksoft SaaS



Feedback and Knowledge Base