Begin detailed description.
This figure depicts a flowchart that presents
the initialization and termination tasks in detail. The following
table presents the functions in the order that you call them, indicates
to which task each function call belongs, and describes any additional
details that the figure conveys.
| Function call | Task | Description |
|---|---|---|
| SQLAllocHandle() | Initialization | Allocates an environment handle. |
| SQLAllocHandle() | Allocates a connection handle. An application can
allocate multiple connection handles under certain conditions. Call SQLAllocHandle() once
for each connection handle that you want to allocate. |
|
SQLConnect() or SQLDriverConnect() |
Connects to a data source. You can call SQLConnect() and SQLDriverConnect() multiple
times to make multiple connections. |
|
| The transaction task occurs at this point. This task uses multiple functions, which the figure describes in detail. | ||
| SQLDisconnect() | Termination | Disconnects the application from a data source. This function is called once for each connection to which the application is currently connected. |
| SQLFreeHandle() | Frees a connection handle that was allocated in the initialization task. This function is called once for each connection handle that is currently allocated. | |
| SQLFreeHandle() | Frees the environment handle. | |
End detailed description.