Skip to content

How to set the value to a query variable and execute it

This example demonstrates how you can set the value to a query and execute it.

In the solution shown below, you set the value to a query variable using the command "dbSetQueryValue" and the query is executed using the "dbExecuteQuery" command in the HICC application.

Solution:

# Command Target Value
Start of a dbCONNECT Block
1 dbBlockOpen
age
To specify to Worksoft SaaS the "database" and "dbCONNECT tunnel" names
2 dbSetContext Worksoft SaaStrainingTunnel
eureqa_postgres_ipc
To set the label name to the query
3 dbSetQueryValue GetZipcodes
select zip.zipCode from eureqaref.Ref_US_Zipcode zip join eureqaref.Ref_US_State stat on stat.stateCode = zip.stateCode where lower(stat.stateName) = lower('California')
To execute the DB Query
4 dbExecuteQuery GetZipcodes
zipcodes
End of a dbCONNECT Block
5 dbBlockEnd

Tips, Tricks, Gotchas & Best Practices:  

  • It is recommended to give a label name to the query using the "dbLabelQuery" command.
  • It is a best practice to set the timeout before you execute a db query, the timeout specified is in seconds.


Feedback and Knowledge Base