Salesforce

Declare Properties (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Declare Properties (Magic xpa 2.x)

Declare is used when you want to reserve a data source or when you want to have a subtask’s data source remain open, instead of it being opened and closed each time the subtask is used.

In Batch tasks, when the subtask may be called many times, leaving the subtask’s data source open results in a significant performance enhancement.

If you are using an XML data source, you can use Declare to define the XML document, so that Magic xpa can create a flat-view that represents the hierarchy structure.

The Declare properties are listed below:

Property

Description

Data Source Number

The number of the data source to be used.

Access

The Access property is relevant only in a multi-user environment. This property determines how the repository is accessed by multiple users.

Use Read for Read Only access or Write for Read and Write access.

When adding a link to a program, it will be defined with the Access property set according to the link type:

  • Changing a link to Link Query, Link Join, or Link Outer Join will change the Access property of the link to Read.

  • Changing a link to Link Write or Link Create will change the Access property of the link to Write.

When performing APG to generate a program which should have links, the Access mode will be Read.

A special setting called SpecialLinkWriteAccess can be used to support behavior from previous versions (where the default was Write).

See also Multi-User Deployment Considerations, Access/Share – XML and Access/Share – XML Runtime.

Data Source Name

Lets you create an expression that determines the physical name of the data source in runtime. If this property has no value, Magic xpa uses the data source name defined in the Data repository and designated by the selected value in the Data Source Number property.

The advantage of this property is that it lets you set different data sources with the same data structure. The expression used to determine the physical name of the data source will only be used if this entry was not already used to open a data source in an ancestor task. In such cases, the name set in the expression will be disregarded.

See also:

How Do I Set a Dynamic Name for a Data Source?

How Do I Open a Data Source Using a Physical Name that is Different than the one Specified on the Data Repository?

XML Source Variable

The XML Source Variable column is only available for XML sources. In this column you can specify a BLOB variable, through which you transfer the XML. The task will read and/or write to this variable.

You can zoom to the Variable list, which displays the BLOB variables of the current task and its ancestors.

Share

The Share property is relevant only in a multi-user environment. This property determines how other, concurrent tasks can access the table.

You can select the Read option to let other tasks have Read Only access. You can select the Write option (the default) to let other tasks have Read and Write access, which effectively locks the row. You can select None for no shared access, which means the table is locked.

The Access and Share combination is used to automatically determine the Open mode of the repository. Access Write with Share Write implies row locking, while Access Read and Write with Share Read implies table sharing. Share None implies exclusive use of the table.

See also Multi-User Deployment Consideration, Access/Share – XML and Access/Share – XML Runtime.

Open

The Open mode options are:

Normal – The Open mode for a valid table for all normal purposes.

Reindex – The Reindex Open mode is available only for ISAM databases. The Reindex Open mode instructs Magic xpa to drop all the indexes of the table when opening it, and process and rebuild the indexes upon session termination. Reindex Open mode is a performance-enhancing feature, for large table imports in Create mode, or for massive index value modification to a table. By removing all the indexes in sequential processing, Magic xpa saves the index-maintenance time normally required for every insert and modify index operation performed by the underlying database manager, such as balancing the B-tree in Btrieve. When the process ends, Magic xpa builds the index structure once for the whole table.

The Reindex Open mode depends on support by the underlying database gateway. Note that when specifying Reindex Open mode, if duplicate index values were entered in a unique index, the re-indexing process may give unexpected results. For instance, Btrieve simply aborts the re-indexing process. Other database gateways may skip the duplicate rows.

Cache

The Cache property is relevant for linked tables only. The setting of this property specifies if the linked table is cached or not. This setting should not be changed for the Main Source.

The possible settings are:

  • Yes – Use cache for the linked tables

  • No – Do not use cache for the linked tables

The default value is based on the Cache strategy in the Data Source Properties dialog box.

Note that for linked tables there is no meaning for Position Cache. Therefore the Position Cache setting is considered as No Cache.

The default setting is taken from the Data Source Properties dialog box as follows:

  • Yes – If Position and Data was specified in the Data Object Properties dialog box; or

  • No – If Position or None was specified in the Data Object Properties dialog box.

See also:

How Do I Reduce Database Access?

Identify Modified Row

You can have Magic xpa indicate the select rows that have been modified by another user, before updating your database.

Magic xpa can identify and select records according to the following options:

  • Position

  • Position and selected fields

  • Position and updated fields

  • As table

This property applies only for deferred transaction mode tasks and SQL or ISAM tables.

For XML sources, this column is set to As Table and is disabled. The file is set to Share = None.

See also Identify Modified Row – Multi-User.

How Can I Determine Magic xpa Behavior When Several Users Are Modifying the Same Row?

Related Topics

Reference
Attachment 
Attachment