Chapter 5 C Routines Reference
Place a connection back in the cache for reuse.
JagStatus JagCmReleaseConnection (
JagCmCache *cache,
SQLCHAR *username,
SQLCHAR *password,
SQLCHAR *server,
SQLCHAR *con_lib,
SQLPOINTER connection,
SQLINTEGER opt
);
cache
The address of a JagCmCache cache handle variable. *cache can be NULL or a valid cache handle.
If *cache is not NULL, must be the cache handle that was used to obtain the connection by calling JagCmGetConnection.
If *cache is NULL, JagCmReleaseConnection attempts to place the connection in a cache that has available space and that uses the same values for username, password, server, and con_lib. If no such cache has available space, the connection is closed and deallocated.
username
The user name of the connection. Ignored unless cache is NULL.
password
The password used by the connection. Ignored unless cache is NULL.
server
The name of the server to which the connection is made. Ignored unless cache is NULL.
con_lib
A string value indicating the connectivity library used by the connection. Ignored unless cache is NULL. Allowable values for con_lib are:
con_lib value |
To indicate |
---|---|
"CTLIB_110" |
Sybase Open Client Client-Library |
"ODBC" |
An ODBC implementation library. |
"OCI_7" |
Oracle Call Interface 7.x |
"OCI_8" |
Oracle Call Interface 8.x |
connection
The connection handle to be released. The connection must be in a state that allows commands to be sent to the remote server. If commands were sent using the connection, the results of the commands must have been completely processed.
opt
One of the following symbolic constants:
Use JAG_CM_DROP to destroy a connection when errors have made it unusable.
JagCmReleaseConnection releases control of a connection that was obtained from JagCmGetConnection.
WARNING! | Do not release a connection more than once. |
"Using Connection Manager Routines in C and ActiveX Components" in the Jaguar CTS Programmer's Guide for examples.
Copyright © 2000 Sybase, Inc. All rights reserved. |
![]() |