build_xact_string

Description

Build a name for a distributed transaction.

Syntax

void build_xact_string(xact_name, service_name,
                     commid, result)
 
char         *xact_name;
char         *service_name;
DBINT      commid;
char        * result;

Parameters

xact_name

The application or user name for the transaction. This name gets encoded in the name string but is not used by the commit service or Adaptive Server. It serves to identify the transaction for debugging purposes.

service_name

The name that will be used by Adaptive Server to contact the commit service, should it be necessary to recover the transaction. If service_name is NULL, the name DSCOMMIT is used.

service_name must correspond to name of the interfaces file entry for the commit service. If service_name is NULL, the interfaces file must contain an entry for DSCOMMIT.

commid

The number used by the commit service to identify the transaction. commid is the number returned by the call to start_xact.

result

Address of buffer where the string should be built. The space must be allocated by the caller.

Returns

None.

Usage

See also

commit_xact, start_xact