SQL Considerations (Magic xpa 3.x)
The task that actually opens a transaction should have at least one table declared from each database that will participate in the transaction. If no table is declared and Magic xpa has to open a transaction (either task level or record level), then the ISAMTransaction keyword is taken into account.
Magic xpa allows you to interact with one or more SQL databases at the same time but still keeps the interaction with the database transparent to the developer.
Magic xpa translates the operations and parameters in the task to an SQL statement.
This behavior achieves the use of a specific gateway that allows Magic xpa to directly interact with each database using the DBMS API.
The Magic xpa gateway list appears in the MAGIC_GATEWAYS section in the Magic.ini file.
To define the Magic xpa environment when working with SQL databases, you must know how to define the flags and settings in the Magic.ini file.
Magic xpa allows you to create programs that contain a free SQL statement (ANSI SQL). This statement will be sent directly to the database without Magic xpa checking it.
This option meets the need to perform database manipulations that are not supported using the Magic xpa operations or will be performed more efficiently using a direct SQL statement (such as aggregate functions).
In Online tasks, Magic xpa creates a new table that will store the result set of a statement or store procedure. A Create table operation is a "heavy" operation and for this reason, it is not recommended to use Direct SQL tasks frequently in Online mode.
Configuring and Defining the Environment
Configuration and Performance