1 Version 4.0 -- 5/1/89 build_xact_string
______________________________________________________________________
NAME: build_xact_string
FUNCTION:
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;
build_xact_string Version 4.0 -- 5/1/89 2
______________________________________________________________________
COMMENTS:
o This routine builds a name string for use in the SQL BEGIN
TRANSACTION and PREPARE TRANSACTION of a SQL Server transac-
tion. If SQL Server has to recover the transaction, it uses
information encoded in the name to determine which commit ser-
vice to contact and which transaction in that service to
inquire about. The application should issue a SQL BEGIN TRAN-
SACTION using the string built by build_xact_string().
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 SQL Server. It serves to identify the
transaction for debugging purposes.
service_name - The name that will be used by SQL Server to con-
tact the commit service, should it be necessary to recover
3 Version 4.0 -- 5/1/89 build_xact_string
______________________________________________________________________
the transaction. If service_name is NULL, the name DSCOMMIT
is used.
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.
SEE ALSO:
commit_xact, start_xact