Cursors - SQL Considerations (Magic xpa 4.x)
The MSSQL gateway uses Dynamic cursors for Online tasks and KeySet cursors for Batch tasks.
Relevant Parameters
|
1. Setting the Cursor data source property to No disables the use of cursors on the specific table and uses DB command instead.
|
|
2. The Max. Connections DBMS property controls the maximum number of connections the gateway can use. The default value is 3 (plus 1 extra) connections. The extra connection is used by the gateway for commands that fetch a single record, or for a command without fetchable results, such as Update. This number is for the Server/User-name pairs. If you have defined several databases in Options/Settings/Databases, and some of them use different servers or different usernames, this number applies to each database that has a different server or user name.
|
Magic xpa enables the developer to use a Cursor for DSQL Statements in SQL Server Stored Procedures. Magic xpa supports using a cursor for DSQL statements that return a result set.
This can be done by adding “/*===CURSOR=Y ===*/” to the DSQL statement.
/*===CURSOR=Y ===*/ is applicable only for DSQL batch commands and Stored Procedures in Online and Batch tasks.