ifx_set_erstate() procedure

The ifx_set_erstate() procedure controls whether database operations are replicated.

Syntax


1  EXECUTE PROCEDURE ifx_set_erstate (
1 1
1 0
1  ' on '
1  ' off '
1 data_var
2  ) ;
Element Purpose Restriction
data_var Variable holding the value that a function returned

Usage

Use the ifx_set_erstate() procedure to enable or disable replication during a transaction. During normally replicated transactions, use the ifx_set_erstate() procedure to enable the recapture of a transaction after it has been replicated. You must reset the replication state back to the default at the end of the transaction or replication loops indefinitely.

Replication can only be enabled on tables that are participants in an existing replicate. To enable replication, set the ifx_set_erstate() procedure to 1 or 'on'. To disable replication, set the ifx_set_erstate() procedure to 0 or 'off'. To set replication to a previous state that was saved by the ifx_get_erstate() function, set the ifx_set_erstate() procedure to the name of the variable returned by the ifx_get_erstate() function.

Example

The following example enables replication in the transaction:

EXECUTE PROCEDURE ifx_set_erstate(1);

The following example resets the replication state to a previous state that was saved by the ifx_get_erstate() function in the curstate variable:

EXECUTE PROCEDURE ifx_set_erstate(curstate);