1 Version 4.0 -- 5/1/89 start_xact
______________________________________________________________________
NAME: start_xact
FUNCTION:
Start a distributed transaction using the commit service.
SYNTAX:
DBINT start_xact(connect, application_name, xact_name, site_count)
DBPROCESS *connect;
char *application_name;
char *xact_name;
int site_count;
start_xact Version 4.0 -- 5/1/89 2
______________________________________________________________________
COMMENTS:
o This routine records the start of a distributed transaction
with the commit service. A record is placed in the commit ser-
vice containing the commid, which is a number that caller sub-
sequently uses to identify the transaction to the commit ser-
vice.
PARAMETERS:
connect - A pointer to the DBPROCESS used to communicate with
the commit service.
application_name - The name of the application. This name can be
anything the application chooses. It will appear in the table
maintained by the commit service but is not used by the com-
mit service or the SQL Server recovery system.
xact_name - The name of the transaction. This name will appear
in the table maintained by the commit service and must be
3 Version 4.0 -- 5/1/89 start_xact
______________________________________________________________________
supplied as part of the transaction name string built by
build_xact_string(). The name cannot contain a period (".")
or a colon (":").
site_count - The number of sites participating in the transac-
tion.
RETURNS:
An integer called the commid. This number is used to identify the
transaction in subsequent calls to the commit service. In case
of error, this routine will return 0.
SEE ALSO:
abort_xact, build_xact_string, commit_xact, remove_xact,
scan_xact, stat_xact