Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Database actions help you to perform various queries on the database.

Suppose you wish to execute an update query on the database.

Structure :

executeUpdateQuery <parameters>

Action

Parameter

Example Usage

executeQueryAndStoreResults

Web, Mobile


To execute the query (mentioned in Parameter 2) on database, with database connection string (mentioned in Parameter 1) and store the result in variable (mentioned in Parameter 3) for further use.

Param 1 : Database connection string
Param 2 : Query to execute
Param 3 : Variable name to store theresultant value

Example :

executeQueryAndStoreResult : <Data Base String : bqdbString> <Query : select xxxx from Table where xxxx= xxx> <In Variable : bqVariable>

Executes query (select xxxx from Table where xxxx= xxx) on database, with database connection string (bqdbString) and stores the result in (bqVariable) variable.

executeUpdateQuery

Web, Mobile


To execute the update query (mentioned in Parameter 2) on database, with database connection string (mentioned in Parameter 1). 

Param 1 : Database Connection String
Param 2 : Update Query to execute

Example :

executeUpdateQuery : <Data Base String : bqdbString> <Update Query : update Table set xxxx= xxx where yyyy=yyyy>

Executes query (update Table set xxxx= xxx where yyyy=yyyy) on database, with database connection string (bqdbString).

executeDeleteQuery

Web, Mobile


To execute the delete query (mentioned in Parameter 2) on database, with database connection string (mentioned in Parameter 1).

Param 1 : Database Connection String
Param 2 : Delete Query to execute

Example :

executeDeleteQuery : <Data Base String : bqdbString> <Delete Query : delete from Table where yyyy=yyyy>

Execute query (delete from Table where yyyy=yyyy) on database, with database connection string (bqdbString).

executeInsertQuery

Web, Mobile


To execute the insert query (mentioned in Parameter 2) on database, with database connection string (mentioned in Parameter 1).

Param 1 : Database Connection String
Param 2 : Insert Query to execute

Example :

executeInsertQuery : <Data Base String : bqdbString> <Insert Query : Insert into Table values (xxxxxxxx)>

Execute query (Insert into Table values (xxxxxxxx)) on database, with database connection string (bqdbString).

executeStoredProcedureAndStoreResult

Web, Mobile


To execute the stored procedure (mentioned in Parameter 2) on database, with database connection string (mentioned in Parameter 1).

Param 1 : Database Connection String
Param 2 : Name of procedure

Example :

executeStoredProcedureAndStoreResult : <Data Base String : bqdbString> <Procedure Name : SP1>

Executes stored procedure SP1 on database, with database connection string bqdbString.

setDbInputParameter

Web, Mobile


To set the input parameter name (mentioned in parameter 1) and parameter value (mentioned in parameter 2), of data type (mentioned in parameter 3).

The default parameter type is String. If no value is provided in param 3, String will be used as parameter type.

If parameter type is mentioned as Date, default date format will be used unless user provides a date format in param 4.

Param 1 : Name of the parameter
Param 2 : Value of the parameter
Param 3 (Optional) : Type of parameter
Param 4 (Optional) : Data Format

Example 1 :

setDbInputParameter : <Parameter Name : userName> <Parameter Value : bqurious> <Parameter Type : > <Date Format : >

 Sets input parameter name userName with parameter value bqurious of parameter type String.

Example 2 :

setDbInputParameter : <Parameter Name : setDate> <Parameter Value : 16/04/2020> <Parameter Type : Date> <Date Format : >

Suppose the default date format mentioned in App config. is MM/dd/yy.

Sets input parameter name setDate with parameter value 04/16/20 (date converted to default format) of parameter type Date.

Example 3 :

setDbInputParameter : <Parameter Name : setDate> <Parameter Value : 16/04/2020> <Parameter Type : Date> <Date Format : dd/MM/yy>

Sets input parameter name setDate with parameter value 16/04/20 (date converted to the provided format in param 4) of parameter type Date.

setDbOutputParameter

Web, Mobile


To set the output parameter (name mentioned in parameter 1) of data type (type mentioned in Parameter 3.

The default parameter type is String. If no value is provided in param 2, String will be used as parameter type.

Param 1 : Name of the parameter
Param 2 (Optional) : Type of parameter

Example 1 :

setDbOutputParameter : <Parameter Name : userName> <Parameter Type : >

Sets output parameter userName of type String.

Example 2 :

setDbOutputParameter : <Parameter Name : setDate> <Parameter Type : Date>

Sets output parameter setDate of type Date.

verifyQueryResults

Web, Mobile


To verify the query (mentioned in Parameter 2) on database, with database connection string (mentioned in Parameter 1), returns the value (mentioned in Parameter 3).

Param 1 : Database connection string
Param 2 : Query to execute
Param 3 : Expected Result

Example :

verifyQueryResults : <Data Base String : bqdbString> <Query : select xyz from Table where xx = yyyy> <Expected Results : bqResults>

Verifies query (select xyz from Table where xx = yyyy) returns value (bqResults) on database with database connection string (bqdbString).


Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@10213
showSpacefalse
sortmodified
typepage
reversetrue
labelskb-how-to-article
cqllabel = "kb-how-to-article" and type = "page" and space = "BSD"


Page Properties
hiddentrue


Related issues