◷ Reading Time: 2 minutes
Summary
This command selects one or more records from a database table. The return value from the database will be one or multiple rows (i.e., an array of rows). Each row will have a GetValue (string name) method that can be accessed to read the value of the columns of the row; otherwise, its indexer can be used.
Parameters
- command
- Description: The Select command
- Mandatory: Yes
- Type: String
- return
- Description: Name of the variable in which the row will be stored
- Mandatory: Yes
- Type: String
- storedProcedure
- Description: Determines whether the command should execute a stored procedure in the database
- Mandatory: No
- Type: Boolean (true/false)
- multi
- Description: Indicates whether the Select command will return multiple rows
- Mandatory: No
- Type: Boolean (true/false)
- expando
- Description: Indicates whether the Select result will be return as a single/list of ExpandoObject
- Mandatory: No
- Type: Boolean (true/false)
- dynamicSQL
- Description: True when the ‘command’ is going to be evaluated against the current execution context, otherwise false.
- Mandatory: No
- Type: Boolean (true/false)
Internal Commands
Param
This command sends a Break command to the execution flow iterating inside a Do command.
Sample
<Database connection-ref="cnn" type="MsAccess"> <SelectRow command="select * from person where id = @id" multi="true" return="list"> <Param name="id" type="System.Int32" value="1"/> </SelectRow> </Database> <Var name="name" value='(list[0]).GetValue("FName")' process="true"/>