Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
a_f:a:exec_sp [2023/02/08 23:37] seana_f:a:exec_sp [2025/11/03 05:34] (current) – [Pagination in Queries implemented as stored procedures] aware_admin
Line 1: Line 1:
-{{tag>Actions Action_List Process Query SQL Version:v4.8}}+{{tag>Index Action Action_List Process Query SQL Version:v4.8}}
 ====== EXEC_SP ====== ====== EXEC_SP ======
  
Line 12: Line 12:
  
   * ''SPName'' is the name of the stored procedure to execute (must be enclosed in apostrophe)   * ''SPName'' is the name of the stored procedure to execute (must be enclosed in apostrophe)
-  * ''DatabaseEnvironment'' if present indicates the name of the database environment where the stored procedure is defined (see objects persisted in [[docs:2500_config_apps:2800_external_sys_ldap|external databases]]). If not present the native Aware IM database is used.+  * ''DatabaseEnvironment'' if present indicates the name of the database environment where the stored procedure is defined (see objects persisted in [[docs:2500_config_apps:2300_external_sys_ldap|external databases]]). If not present the native AwareIM database is used.
   * ''ParamName'' is the name of the parameter of the stored procedure (if stored procedure requires a parameter. A parameter can be ''IN'', ''OUT'' or ''INOUT''. If parameter type is omitted ''IN'' is assumed   * ''ParamName'' is the name of the parameter of the stored procedure (if stored procedure requires a parameter. A parameter can be ''IN'', ''OUT'' or ''INOUT''. If parameter type is omitted ''IN'' is assumed
-  * ArithmeticExpression an Aware IM expression to initialize input parameters with. If the parameter is of ''OUT'' or ''INOUT'' type this expression must be the name of an attribute of a business object +  * ArithmeticExpression an AwareIM expression to initialize input parameters with. If the parameter is of ''OUT'' or ''INOUT'' type this expression must be the name of an attribute of a business object 
-  * ''ObjectName'' if the stored procedure returns a result set (the result of the ''SQL SELECT'' statement) Aware IM can convert each record to the instance of the specified object. An object that is persisted in the database table of the ''SELECT'' statement must be defined. The resulting object instances are either placed in the Context if the ''EXEC_SP'' action is used in rules or returned by a query if the action is used in a rule form of the query+  * ''ObjectName'' if the stored procedure returns a result set (the result of the ''SQL SELECT'' statement) AwareIM can convert each record to the instance of the specified object. An object that is persisted in the database table of the ''SELECT'' statement must be defined. The resulting object instances are either placed in the Context if the ''EXEC_SP'' action is used in rules or returned by a query if the action is used in a rule form of the query 
  
 ===== Examples ===== ===== Examples =====
Line 21: Line 22:
 <code aim>EXEC_SP 'procAlertGetAll' RETURN Alert </code> <code aim>EXEC_SP 'procAlertGetAll' RETURN Alert </code>
  
-This stored procedure does not require any parameters. It ''selects'' all alert records in the native database, that Aware IM will automatically convert to instances of the Alert object and put in the context or make available for a query+This stored procedure does not require any parameters. It ''selects'' all alert records in the native database, that AwareIM will automatically convert to instances of the Alert object and put in the context or make available for a query
  
 <code aim>EXEC_SP 'procAlertGet' WITH '@alerID'=1 RETURN Alert </code> <code aim>EXEC_SP 'procAlertGet' WITH '@alerID'=1 RETURN Alert </code>
Line 37: Line 38:
 <code aim>EXEC_SP 'proc1' OF SQLServer WITH '@param1'=1,'@param2'=2 RETURN SomeObject </code>  <code aim>EXEC_SP 'proc1' OF SQLServer WITH '@param1'=1,'@param2'=2 RETURN SomeObject </code> 
  
-This stored procedure returns the specified records from an [[docs:2500_config_apps:2800_external_sys_ldap:0100_define_objects_using_exist_table|external database]] identified by the name SQLServer.+This stored procedure returns the specified records from an [[docs:2500_config_apps:2300_external_sys_ldap:0100_define_objects_using_exist_table|external database]] identified by the name SQLServer.
  
  
  
  • Last modified: 2023/02/08 23:37