RuleAPI:Procedural commands/Database/ExecuteScalar

From FlexRule Wiki
Jump to: navigation, search


This command can be used when you wish to run a query command result (or more likely a stored procedure) that returns data.


  1. command
    1. Description: The TSQL command that returns a single cell column value
    2. Mandatory: Yes
    3. Type: String
  2. return
    1. Description: Name of the variable in which the row will be stored
    2. Mandatory: Yes
    3. Type: String
  3. storedProcedure
    1. Description: Determines whether the command should execute a stored procedure in the database
    2. Mandatory: False
    3. Type: Boolean (true/false)

Internal Commands



  1. <Database connection-ref="cnn" type="MsSql">
  2.     <ExecuteScalar command="SELECT count(*) from person" return="count"/>
  3. </Database>