ExecuteScalar

◷ Reading Time: 1 minute

Summary

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

Parameters

  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

Param

Sample

<Database connection-ref="cnn" type="MsSql">
    <ExecuteScalar command="SELECT count(*) from person" return="count"/>
</Database>
Updated on October 30, 2023

Was this article helpful?

Related Articles