Chapter 5 C Routines Reference
Obtain the connectivity-library-specific context reference that is used to allocate cached connections in a cache.
JagStatus JagCmGetCtx (
JagCmCache *cache,
SQLCHAR *username,
SQLCHAR *password,
SQLCHAR *server,
SQLCHAR *con_lib,
SQLPOINTER *ctx
);
cache
The address of a JagCmCache cache handle variable. The input value determines how the parameter is used:
username
When *cache is NULL, the user name for connections in the desired cache. Ignored when *cache is not NULL.
password
When *cache is NULL, the password used by connections in the desired cache. Ignored when *cache is not NULL.
server
When *cache is NULL, the name of the server to which cached connections are made. Ignored when *cache is not NULL.
con_lib
When *cache is NULL, a string value indicating the connectivity library used by connections in the cache. Ignored when cache is not NULL.
When cache is NULL, con_lib must be one of the following:
con_lib value |
To indicate |
---|---|
"CTLIB_110" |
Sybase Open Client Client-Library |
"ODBC" |
An ODBC implementation library |
ctx
The address of a variable that receives the connectivity library context used to allocate cached connections. The returned type depends on the connectivity library, as follows:
Returns |
To indicate |
---|---|
JAG_SUCCEED |
Successful retrieval of the CS_CONTEXT for a Client-Library connection cache. |
JAG_FAIL |
Failure. JagCmGetCtx fails when con_lib specifies an invalid value. |
JagCmGetCtx fails for the following reasons:
JagCmGetCtx retrieves the context or environment handle that is used to allocate connections in a cache.
Copyright © 2000 Sybase, Inc. All rights reserved. |
![]() |