Begin detailed description.

This figure shows the basic steps an application might take to make coordinated transactions on multiple connections.

The following table lists these steps in the order they occur, indicates the transaction to which each step belongs, and provides comments that describe what occurs.
Application step Transaction Comments
Allocate environment None These steps set the connection type to concurrent and initialize two connections with two statement handles per connection.
Set environment attribute SQL_ATTR_CONNECTTYPE to SQL_COORDINATED_TRANS
Allocate connection "A"
Connect "A" (which the environment attributes specify as coordinated)
Allocate statement "A1"
Allocate statement "A2"
Allocate connection "B"
Connect "B" (which the environment attributes specify as coordinated)
Allocate statement "B1"
Allocate statement "B2"
Execute statement "A1" Coordinated transaction 1 A coordinated transaction begins when the first statement is executed and ends when a commit is issued. Coordinated transactions include statements on all connections.
Execute statement "A2"
Execute statement "B2"
Execute statement "B1"
Commit
Execute statement "B2" Coordinated transaction 2
Execute statement "A1"
Execute statement "B2"
Execute statement "A2"
Execute statement "B1"
Commit

End detailed description.